release v2.0.0 #4
|
@ -67,8 +67,10 @@ export const useMainStore = defineStore({
|
|||
},
|
||||
|
||||
async login(userid: string, password: string) {
|
||||
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);
|
||||
return true;
|
||||
} catch ({ response }) {
|
||||
|
|
Loading…
Reference in New Issue