diff --git a/api/src/stores/main.ts b/api/src/stores/main.ts index 31db06c..af97178 100644 --- a/api/src/stores/main.ts +++ b/api/src/stores/main.ts @@ -70,10 +70,11 @@ export const useMainStore = defineStore({ const userStore = useUserStore(); try { const { data } = await api.post('/auth', { userid, password }); - this.user = await userStore.getUser(data.userid, true); this.session = fixSession(data); + this.user = await userStore.getUser(data.userid, true); return true; } catch ({ response }) { + this.handleLoggedOut(); return (response)?.status || false; } },