From 49c3ec74ba27d51c7b3072d59ddbcf301fd77d0b Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 5 Dec 2021 13:33:02 +0100 Subject: [PATCH] fix(api): Load current user in login function of mainStore --- api/src/stores/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/stores/main.ts b/api/src/stores/main.ts index 172797c..31db06c 100644 --- a/api/src/stores/main.ts +++ b/api/src/stores/main.ts @@ -67,8 +67,10 @@ export const useMainStore = defineStore({ }, async login(userid: string, password: string) { + const userStore = useUserStore(); try { const { data } = await api.post('/auth', { userid, password }); + this.user = await userStore.getUser(data.userid, true); this.session = fixSession(data); return true; } catch ({ response }) {