From dfa30258aa3ee725c94af584e22d39c046cd5d10 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 1 Feb 2022 21:25:42 +0100 Subject: [PATCH] chore: rename function --- src/components/misc/ready.vue | 4 ++-- src/router/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/misc/ready.vue b/src/components/misc/ready.vue index fd5fe92d8..f94a413e8 100644 --- a/src/components/misc/ready.vue +++ b/src/components/misc/ready.vue @@ -53,7 +53,7 @@ import {ERROR_NO_API_URL} from '@/helpers/checkAndSetApiUrl' import {useOnline} from '@/composables/useOnline' import {useRouter, useRoute} from 'vue-router' -import {checkAuth} from '@/router' +import {getAuthForRoute} from '@/router' const router = useRouter() const route = useRoute() @@ -69,7 +69,7 @@ const showLoading = computed(() => !ready.value && error.value === '') async function load() { try { await store.dispatch('loadApp') - const redirectTo = checkAuth(route) + const redirectTo = getAuthForRoute(route) if (typeof redirectTo !== 'undefined') { await router.push(redirectTo) } diff --git a/src/router/index.ts b/src/router/index.ts index 3f999c700..17d66ba5f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -575,7 +575,7 @@ const router = createRouter({ ], }) -export function checkAuth(route: RouteLocation) { +export function getAuthForRoute(route: RouteLocation) { const authUser = store.getters['auth/authUser'] const authLinkShare = store.getters['auth/authLinkShare']