mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
fix: redirect to map on social login
This commit is contained in:
1 parent
7320688827
commit
5b71944588
1 file changed
+4
-9
+4
-9
@@ -10,11 +10,9 @@ const routes = [
|
|||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
redirect: {
|
redirect: {
|
||||||
name: 'game',
|
name: 'register',
|
||||||
params: {
|
|
||||||
questId: 'helloworld',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
meta: { requiresGuest: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
@@ -66,13 +64,10 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
})
|
})
|
||||||
} else if (to.meta.requiresGuest && loggedIn) {
|
} else if (to.meta.requiresGuest && loggedIn) {
|
||||||
next({
|
next({
|
||||||
name: 'game', // Or any default authenticated user route
|
name: 'map',
|
||||||
params: {
|
|
||||||
questId: 'helloworld',
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
next() // Always call next() at the end
|
next()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user