fix(auth): update token validation method in layout store
This commit is contained in:
@@ -53,7 +53,7 @@ export const useLayoutStore = create<LayoutStore>((set, get) => ({
|
||||
isAdmin: false,
|
||||
setIsAdmin: (isAdmin) => set({ isAdmin }),
|
||||
init: async () => {
|
||||
const token = await queryLogin.getToken()
|
||||
const token = await queryLogin.checkTokenValid()
|
||||
if (token) {
|
||||
const user = await queryLogin.checkLocalUser() as UserInfo;
|
||||
if (user) {
|
||||
|
||||
Reference in New Issue
Block a user