release v2.0.0 #4
|
@ -70,10 +70,11 @@ export const useMainStore = defineStore({
|
|||
const userStore = useUserStore();
|
||||
try {
|
||||
const { data } = await api.post<FG.Session>('/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 (<AxiosResponse | undefined>response)?.status || false;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue