feat(userAccount): enhance user profile handling with avatar upload and additional user data

This commit is contained in:
hamed
2026-06-19 10:19:52 +03:30
parent f6a3082ac8
commit ea2c0c29ec
7 changed files with 94 additions and 20 deletions
+8
View File
@@ -39,6 +39,14 @@ export const request = {
postUserProfile: (data) => api.post("api/v1/user-profile", data, { requireAuth: true }),
patchUserProfile: (data, uuid) =>
api.patch(`api/v1/user-profile/${uuid}`, data, { requireAuth: true }),
uploadUserAvatar: (file) =>
api.post("api/v1/user-profile/avatar", file, {
requireAuth: true,
headers: {
"Content-Type": "application/octet-stream",
"Content-Disposition": `filename="${file?.name || "avatar.jpg"}"`,
},
}),
getUserInfo: (headers) => api.get("oauth/userinfo", { ...headers, requireAuth: true }),
getInsuranceType: () =>
api.get(`api/v1/insurances?type=basic`, { requireAuth: true }),