权限问题修改
This commit is contained in:
@@ -130,7 +130,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
|
||||
async function loginByToken(loginToken: Api.Auth.LoginToken) {
|
||||
// 1. stored in the localStorage, the later requests need it in headers
|
||||
localStg.set('userInfo', loginToken);
|
||||
localStg.set('token', loginToken.token);
|
||||
|
||||
// 2. get user info
|
||||
@@ -149,6 +148,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
const { data: info, error } = await fetchGetUserInfo();
|
||||
|
||||
if (!error) {
|
||||
localStg.set('userInfo', info);
|
||||
// update store
|
||||
Object.assign(userInfo, info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user