feat: rename revokeInvite to deleteInvite and update related functionality

This commit is contained in:
shuaiplus
2026-06-29 11:47:05 +08:00
parent 4378e1b430
commit f82dcc3c17
15 changed files with 71 additions and 39 deletions
+2 -2
View File
@@ -24,9 +24,9 @@ export async function createInvite(authedFetch: AuthedFetch, hours: number): Pro
if (!resp.ok) throw new Error('Create invite failed');
}
export async function revokeInvite(authedFetch: AuthedFetch, code: string): Promise<void> {
export async function deleteInvite(authedFetch: AuthedFetch, code: string): Promise<void> {
const resp = await authedFetch(`/api/admin/invites/${encodeURIComponent(code)}`, { method: 'DELETE' });
if (!resp.ok) throw new Error('Revoke invite failed');
if (!resp.ok) throw new Error('Delete invite failed');
}
export async function deleteAllInvites(authedFetch: AuthedFetch): Promise<void> {