完成修改密码删除用户

This commit is contained in:
2025-05-12 12:47:27 +08:00
parent 5c29938730
commit c17108e094
9 changed files with 331 additions and 14 deletions

View File

@@ -2,4 +2,5 @@ export * from './list';
export * from './get';
export * from './create';
export * from './update';
export * from './set-password';
export * from './set-password';
export * from './remove';

View File

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

View File

@@ -1,7 +1,7 @@
import fetcher from "../../fetcher";
export async function setPassword(userId: string, password: string) {
return fetcher(`/admin/user/${userId}/password`, {
return fetcher(`/api/admin/user/${userId}/password`, {
method: 'POST',
body: JSON.stringify({
password,