hold action mobile + najva token updated

This commit is contained in:
hamid zarghami
2025-07-28 12:43:37 +03:30
parent 80114f6fc7
commit f67336eebe
5 changed files with 122 additions and 52 deletions
@@ -43,4 +43,10 @@ export const useSingleUpload = () => {
return useMutation({
mutationFn: (variables: FormData) => api.singleUpload(variables),
});
};
export const useUpdatePushToken = () => {
return useMutation({
mutationFn: (variables: UpdateProfileType) => api.updatePushToken(variables),
});
};
@@ -22,6 +22,11 @@ export const updateProfile = async (params: UpdateProfileType) => {
return data;
};
export const updatePushToken = async (params: UpdateProfileType) => {
const { data } = await axios.post(`/users/push-token`, params);
return data;
};
export const updateEmail = async (params: UpdateEmailType) => {
const { data } = await axios.patch(`/users/change-email`, params);
return data;