feat: add functionality to delete invalid invites and update related components

This commit is contained in:
shuaiplus
2026-06-29 12:12:13 +08:00
parent e31f82c0d6
commit 0d1bb196e2
15 changed files with 96 additions and 3 deletions
+5
View File
@@ -29,6 +29,11 @@ export async function deleteInvite(authedFetch: AuthedFetch, code: string): Prom
if (!resp.ok) throw new Error('Delete invite failed');
}
export async function deleteInvalidInvites(authedFetch: AuthedFetch): Promise<void> {
const resp = await authedFetch('/api/admin/invites?scope=invalid', { method: 'DELETE' });
if (!resp.ok) throw new Error('Delete invalid invites failed');
}
export async function deleteAllInvites(authedFetch: AuthedFetch): Promise<void> {
const resp = await authedFetch('/api/admin/invites', { method: 'DELETE' });
if (!resp.ok) throw new Error('Delete all invites failed');