update customer

This commit is contained in:
hamid zarghami
2026-07-02 10:35:38 +03:30
parent 2d35a428b1
commit 6187e7c26d
6 changed files with 404 additions and 144 deletions
@@ -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,