完成了一些接口
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
export * from './list';
|
||||
export * from './get';
|
||||
export * from './create';
|
||||
export * from './update';
|
||||
export * from './update';
|
||||
export * from './set-password';
|
||||
7
tone-page-web/lib/api/admin/user/remove.ts
Normal file
7
tone-page-web/lib/api/admin/user/remove.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import fetcher from "../../fetcher";
|
||||
|
||||
export async function remove(userId: string) {
|
||||
return fetcher(`/admin/user/${userId}`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
}
|
||||
10
tone-page-web/lib/api/admin/user/set-password.ts
Normal file
10
tone-page-web/lib/api/admin/user/set-password.ts
Normal 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,
|
||||
}),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user