feat: port tasks store to pinia

This commit is contained in:
Dominik Pschenitschni 2022-09-23 12:55:53 +02:00
parent 1fdda07f65
commit 34ffd1d572
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
20 changed files with 157 additions and 128 deletions

View file

@ -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()
},
},