1
0

feat: check link share auth from store instead

This commit is contained in:
kolaente
2023-04-01 17:56:30 +02:00
parent a33e2f6c00
commit c2ffe3a9dc
2 changed files with 14 additions and 13 deletions

View File

@ -56,11 +56,13 @@ import {useOnline} from '@/composables/useOnline'
import {getAuthForRoute} from '@/router'
import {useBaseStore} from '@/stores/base'
import {useAuthStore} from '@/stores/auth'
const router = useRouter()
const route = useRoute()
const baseStore = useBaseStore()
const authStore = useAuthStore()
const ready = computed(() => baseStore.ready)
const online = useOnline()
@ -72,7 +74,7 @@ async function load() {
try {
await baseStore.loadApp()
baseStore.setReady(true)
const redirectTo = await getAuthForRoute(route)
const redirectTo = await getAuthForRoute(route, authStore)
if (typeof redirectTo !== 'undefined') {
await router.push(redirectTo)
}