update customer
This commit is contained in:
@@ -8,6 +8,8 @@ import type {
|
||||
GetUsersParams,
|
||||
ImportUsersResponse,
|
||||
SearchUserByPhoneResponse,
|
||||
UpdateUserResponse,
|
||||
UpdateUserType,
|
||||
} from "@/pages/customers/types/Types";
|
||||
|
||||
export const getUsers = async (params?: GetUsersParams) => {
|
||||
@@ -30,6 +32,14 @@ export const createUser = async (params: CreateUserType) => {
|
||||
return data;
|
||||
};
|
||||
|
||||
export const updateUser = async (userId: string, params: UpdateUserType) => {
|
||||
const { data } = await axios.patch<UpdateUserResponse>(
|
||||
`/admin/users/${userId}`,
|
||||
params,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const createUserAddress = async (
|
||||
userId: string,
|
||||
params: CreateUserAddressType,
|
||||
|
||||
Reference in New Issue
Block a user