feat: port tasks store to pinia
This commit is contained in:
parent
1fdda07f65
commit
34ffd1d572
20 changed files with 157 additions and 128 deletions
|
|
@ -21,6 +21,7 @@ import ListService from '../services/list'
|
|||
import {checkAndSetApiUrl} from '@/helpers/checkAndSetApiUrl'
|
||||
|
||||
import type { RootStoreState, StoreState } from './types'
|
||||
import pinia from '@/pinia'
|
||||
import {useAuthStore} from '@/stores/auth'
|
||||
|
||||
export const key: InjectionKey<Store<StoreState>> = Symbol()
|
||||
|
|
@ -130,7 +131,7 @@ export const store = createStore<RootStoreState>({
|
|||
},
|
||||
async loadApp() {
|
||||
await checkAndSetApiUrl(window.API_URL)
|
||||
const authStore = useAuthStore()
|
||||
const authStore = useAuthStore(pinia)
|
||||
await authStore.checkAuth()
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Reference in a new issue