chore: rename function

This commit is contained in:
kolaente 2022-02-01 21:25:42 +01:00
parent 55826bb8c9
commit dfa30258aa
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 3 additions and 3 deletions

View file

@ -53,7 +53,7 @@ import {ERROR_NO_API_URL} from '@/helpers/checkAndSetApiUrl'
import {useOnline} from '@/composables/useOnline' import {useOnline} from '@/composables/useOnline'
import {useRouter, useRoute} from 'vue-router' import {useRouter, useRoute} from 'vue-router'
import {checkAuth} from '@/router' import {getAuthForRoute} from '@/router'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
@ -69,7 +69,7 @@ const showLoading = computed(() => !ready.value && error.value === '')
async function load() { async function load() {
try { try {
await store.dispatch('loadApp') await store.dispatch('loadApp')
const redirectTo = checkAuth(route) const redirectTo = getAuthForRoute(route)
if (typeof redirectTo !== 'undefined') { if (typeof redirectTo !== 'undefined') {
await router.push(redirectTo) await router.push(redirectTo)
} }

View file

@ -575,7 +575,7 @@ const router = createRouter({
], ],
}) })
export function checkAuth(route: RouteLocation) { export function getAuthForRoute(route: RouteLocation) {
const authUser = store.getters['auth/authUser'] const authUser = store.getters['auth/authUser']
const authLinkShare = store.getters['auth/authLinkShare'] const authLinkShare = store.getters['auth/authLinkShare']