/login is alias of signin component.

This commit is contained in:
2020-04-09 20:59:45 +02:00
committed by KevinMidboe
parent e193528fe9
commit a8b8603649

View File

@@ -54,6 +54,7 @@ let routes = [
{ {
name: 'signin', name: 'signin',
path: '/signin', path: '/signin',
alias: '/login',
component: (resolve) => require(['./components/Signin.vue'], resolve) component: (resolve) => require(['./components/Signin.vue'], resolve)
}, },
// { // {
@@ -107,7 +108,7 @@ router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requiresAuth)) { if (to.matched.some(record => record.meta.requiresAuth)) {
if (localStorage.getItem('token') == null) { if (localStorage.getItem('token') == null) {
next({ path: '/login' }); next({ path: '/signin' });
} }
} }