Cleaner logout.

This commit is contained in:
Leo Vasanko 2025-09-02 19:11:25 -06:00
parent b324276173
commit b0a1bb72dc

View File

@ -130,8 +130,7 @@ export const useAuthStore = defineStore('auth', {
async logout() { async logout() {
try { try {
await fetch('/auth/api/logout', {method: 'POST'}) await fetch('/auth/api/logout', {method: 'POST'})
this.userInfo = null location.reload()
if (this.restrictedMode) location.reload()
} catch (error) { } catch (error) {
console.error('Logout error:', error) console.error('Logout error:', error)
this.showMessage(error.message, 'error') this.showMessage(error.message, 'error')