From fca0c7627ec2789ecf64bf77d6f6179b8f8e2222 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 20 Apr 2021 12:27:54 +0200 Subject: [PATCH] only one navigation guard in main.js --- frontend/src/routes/router.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/frontend/src/routes/router.js b/frontend/src/routes/router.js index 93892801d..6671a8de9 100644 --- a/frontend/src/routes/router.js +++ b/frontend/src/routes/router.js @@ -1,7 +1,6 @@ import Vue from 'vue' import VueRouter from 'vue-router' import routes from './routes' -import { store } from '../store/store' Vue.use(VueRouter) @@ -21,12 +20,4 @@ const router = new VueRouter({ }, }) -router.beforeEach((to, from, next) => { - if (to.meta.requiresAuth && !store.state.session_id) { - next({ path: '/login' }) - } else { - next() - } -}) - export default router