Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-02-19 12:27:59 +03:00
parent 76e7ca2e4a
commit 1ced1b1649
6 changed files with 76 additions and 40 deletions

View File

@@ -78,15 +78,7 @@ export const useAuthStore = defineStore('auth', {
========================================================= */
setSession ({ token, user }) {
this.token = token
if (user) {
// Keep prior role fields if backend returns partial user payload.
this.user = {
...(this.user || {}),
...user
}
} else {
this.user = null
}
this.user = user || null
this.forcePasswordChange = !!user?.force_password_change
localStorage.setItem('token', token)