feat: 优化项目目录结构
This commit is contained in:
20
apps/frontend/lib/api/admin/user/create.ts
Normal file
20
apps/frontend/lib/api/admin/user/create.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { User } from "@/lib/types/user";
|
||||
import fetcher from "../../fetcher";
|
||||
|
||||
interface createUserParams {
|
||||
username: string | null;
|
||||
nickname: string | null;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
password: string | null;
|
||||
}
|
||||
|
||||
export async function create(data: createUserParams) {
|
||||
return fetcher<User>("/api/admin/user", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(data),
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user