feat: enhance user account management with password and profile updates

- Added validation for user profile and password update forms using Yup.
- Implemented user feedback for successful profile and password updates, including prompts to re-login.
- Improved UI for profile editing and password change sections, enhancing user experience.
- Updated password update service to include response metadata handling.
This commit is contained in:
swve 2025-01-24 22:46:05 +01:00
parent 943ceff813
commit 79a31dd8ec
4 changed files with 352 additions and 132 deletions

View file

@ -2,6 +2,7 @@ import { getAPIUrl } from '@services/config/config'
import {
RequestBodyWithAuthHeader,
errorHandling,
getResponseMetadata,
} from '@services/utils/ts/requests'
/*
@ -18,6 +19,6 @@ export async function updatePassword(
`${getAPIUrl()}users/change_password/` + user_id,
RequestBodyWithAuthHeader('PUT', data, null, access_token)
)
const res = await errorHandling(result)
const res = await getResponseMetadata(result)
return res
}