only one navigation guard in main.js

This commit is contained in:
Moriz Wahl 2021-04-20 12:27:54 +02:00
parent faa07235bc
commit fca0c7627e

View File

@ -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