Fix PAT & Webauthn registration - Fixes #227

This commit is contained in:
Bubka
2023-09-14 13:39:48 +02:00
parent 43d7922732
commit a0b3b668bb
4 changed files with 14 additions and 6 deletions

View File

@ -88,13 +88,13 @@ router.beforeEach((to, from, next) => {
else if (to.name.startsWith('settings.')) {
if (to.params.returnTo == undefined) {
if (from.params.returnTo) {
next({name: to.name, params: { returnTo: from.params.returnTo }})
next({name: to.name, params: { ...to.params, returnTo: from.params.returnTo }})
}
else if (from.name) {
next({name: to.name, params: { returnTo: from.path }})
next({name: to.name, params: { ...to.params, returnTo: from.path }})
}
else {
next({name: to.name, params: { returnTo: '/accounts' }})
next({name: to.name, params: { ...to.params, returnTo: '/accounts' }})
}
}
else {