Create user
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import axios from "@/config/axios";
|
||||
import type {
|
||||
CreateUserResponse,
|
||||
CreateUserType,
|
||||
GetCustomersResponse,
|
||||
GetUsersParams,
|
||||
ImportUsersResponse,
|
||||
@@ -21,6 +23,11 @@ export const searchUserByPhone = async (phone: string) => {
|
||||
return data;
|
||||
};
|
||||
|
||||
export const createUser = async (params: CreateUserType) => {
|
||||
const { data } = await axios.post<CreateUserResponse>("/admin/users", params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const importUsersFromExcel = async (file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
|
||||
Reference in New Issue
Block a user