feat(userAccount): enhance user profile handling with avatar upload and additional user data
This commit is contained in:
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user