@@ -3,7 +3,6 @@ import { UserRouteName } from "@/router/user";
|
||||
import { AUTH_ACCESS_TOKEN } from "@/constants";
|
||||
import { LoginErrorCode } from "@/types/enums";
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const authGuardIfNeeded: NavigationGuard = async (to, from, next) => {
|
||||
if (to.meta.requiredAuth !== true) return next();
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import { NavigationGuard } from "vue-router";
|
||||
import { CONFIG } from "../../graphql/config";
|
||||
import apolloProvider from "../../vue-apollo";
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const beforeRegisterGuard: NavigationGuard = async (to, from, next) => {
|
||||
const { data } = await apolloProvider.defaultClient.query({
|
||||
query: CONFIG,
|
||||
|
||||
Reference in New Issue
Block a user