prile form:

This commit is contained in:
hamid zarghami
2025-09-16 10:46:02 +03:30
parent ab29dc26dd
commit 87bc7866fa
4 changed files with 229 additions and 113 deletions
+12
View File
@@ -1,7 +1,19 @@
import axios from "@/config/axios";
import { UserMeResponseType } from "@/share/types/SharedTypes";
import {
UpdateProfileRequest,
UpdateProfileResponse,
} from "../types/ProfileTypes";
export const getProfile = async () => {
const { data } = await axios.get<UserMeResponseType>("/user/profile");
return data;
};
export const updateProfile = async (profileData: UpdateProfileRequest) => {
const { data } = await axios.patch<UpdateProfileResponse>(
"/user/profile",
profileData
);
return data;
};