base create order
This commit is contained in:
@@ -3,6 +3,7 @@ import type {
|
||||
GetCustomersResponse,
|
||||
GetUsersParams,
|
||||
ImportUsersResponse,
|
||||
SearchUserByPhoneResponse,
|
||||
} from "@/pages/customers/types/Types";
|
||||
|
||||
export const getUsers = async (params?: GetUsersParams) => {
|
||||
@@ -12,6 +13,14 @@ export const getUsers = async (params?: GetUsersParams) => {
|
||||
return data;
|
||||
};
|
||||
|
||||
export const searchUserByPhone = async (phone: string) => {
|
||||
const { data } = await axios.get<SearchUserByPhoneResponse>(
|
||||
"/admin/users/search-by-phone",
|
||||
{ params: { phone } },
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const importUsersFromExcel = async (file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
|
||||
Reference in New Issue
Block a user