Skip to content

Commit

Permalink
2.12.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Dec 13, 2023
1 parent 2b956ab commit 1996124
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/store/modules/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
import { getToken, removeToken, setToken } from './helper'
import { store } from '@/store/helper'
import { fetchSession } from '@/api'
import { homeStore } from '@/store/homeStore'
import { gptConfigStore, homeStore } from '@/store/homeStore'

interface SessionResponse {
auth: boolean
Expand Down Expand Up @@ -32,6 +32,9 @@ export const useAuthStore = defineStore('auth-store', {
const { data } = await fetchSession<SessionResponse>()
this.session = { ...data }
homeStore.setMyData({session: data });

let str = localStorage.getItem('gptConfigStore');
if( ! str ) setTimeout( ()=> gptConfigStore.setInit() , 500);
return Promise.resolve(data)
}
catch (error) {
Expand Down

0 comments on commit 1996124

Please sign in to comment.