完成了一些接口

This commit is contained in:
2025-05-12 12:07:01 +08:00
parent 4f782e4cea
commit f49a1503f0
7 changed files with 148 additions and 12 deletions

View File

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

View File

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

View File

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