Create user

This commit is contained in:
hamid zarghami
2026-06-23 11:25:19 +03:30
parent 45494d7ae5
commit f83d0743c6
4 changed files with 58 additions and 5 deletions
@@ -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);