Merge pull request #3697 from modoboa/fix/simpleuser_update_profile

Added new route dedicated to user profile update.
This commit is contained in:
Antoine Nguyen
2025-08-27 13:28:47 +02:00
committed by GitHub
5 changed files with 44 additions and 4 deletions
+3
View File
@@ -6,6 +6,9 @@ export default {
getMe() {
return repository.get(`/${resource}/me/`)
},
updateMe(data) {
return repository.put(`/${resource}/me/`, data)
},
checkPassword(value) {
return repository.post(`/${resource}/me/password/`, { password: value })
},
+1 -1
View File
@@ -163,7 +163,7 @@ export const useAuthStore = defineStore('auth', () => {
}
async function updateAccount(data) {
return accountsApi.patch(authUser.value.pk, data).then((response) => {
return accountApi.updateMe(data).then((response) => {
const newAuthUser = { ...authUser.value, ...response.data }
delete newAuthUser.password
authUser.value = { ...newAuthUser }