redirect users with token #38

This commit is contained in:
weeman 2021-09-24 17:51:37 +02:00
parent c3cc51dbf9
commit e6e44d5de8
Signed by: weeman
GPG Key ID: 34F0524D4DA694A1

View File

@ -46,7 +46,12 @@ const routes = [
{
path: '/',
name: 'Index',
component: Index
component: Index,
beforeEnter: (_to, _from, next) => {
if (store.state.token) {
next({name: 'Search'})
}
}
},
]