feat(admin): demo account rebuild button + user asset registry (photo keys cascade-deleted with user)

This commit is contained in:
root
2026-10-17 13:59:18 +08:00
parent 6a97590f90
commit b48c36fdb3
18 changed files with 156 additions and 88 deletions
+2
View File
@@ -211,6 +211,8 @@ export const adminCreateInvite = (code: string, remark: string, baseUrl?: string
adminCall<{ code: string }>('/admin/invites/create', { code, remark }, baseUrl);
export const adminUpdateInvite = (id: number, patch: { remark?: string; valid?: boolean }, baseUrl?: string) =>
adminCall<{ id: number }>('/admin/invites/update', { id, ...patch }, baseUrl);
export const adminDemoRebuild = (baseUrl?: string) =>
adminCall<{ ok: true; seeded: { seeded: boolean; footprints: number; semesters: number } }>('/admin/demo-rebuild', {}, baseUrl);
export const adminDeleteUser = (userId: number | string, baseUrl?: string) =>
adminCall<{ ok: true; username: string; remote_deleted: number }>('/admin/users/delete', { user_id: userId }, baseUrl);
export const adminDeleteInvite = (id: number, baseUrl?: string) =>