实现用户注销和删除系统

This commit is contained in:
2025-05-18 22:25:05 +08:00
parent 32026c5673
commit 0d586f9aae
9 changed files with 87 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
import fetcher from "../../fetcher";
export async function remove(userId: string) {
return fetcher(`/api/admin/user/${userId}`, {
export async function remove(userId: string, soft: boolean) {
return fetcher(`/api/admin/user/${userId}?soft=${soft}`, {
method: 'DELETE',
})
}

View File

@@ -7,4 +7,5 @@ export interface User {
avatar?: string;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
}