Fix user impersonation

This commit is contained in:
Julien Nahum
2024-01-16 11:23:16 +01:00
parent a6d3dc0c80
commit b19baaf8f3
4 changed files with 32 additions and 24 deletions

View File

@@ -19,9 +19,8 @@ export const useAuthStore = defineStore('auth', {
},
// Stop admin impersonation
stopImpersonating() {
this.token = this.admin_token
this.setToken(this.admin_token)
this.admin_token = null
// TODO: re-fetch user
},
setToken(token) {