实现用户注销和删除系统
This commit is contained in:
@@ -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',
|
||||
})
|
||||
}
|
||||
@@ -7,4 +7,5 @@ export interface User {
|
||||
avatar?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
deletedAt: string | null;
|
||||
}
|
||||
Reference in New Issue
Block a user