redirect users with token #38

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

View File

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