Rename startingPoint middleware to setReturnTo

This commit is contained in:
Bubka
2023-11-06 12:40:27 +01:00
parent 08b23a7aa2
commit 5f99bf594a
2 changed files with 20 additions and 20 deletions

View File

@@ -2,10 +2,10 @@
* Allows an authenticated user to access the main view only if he owns at least one twofaccount.
* Push to the starter view otherwise.
*/
export default function starter({ to, next, stores }) {
export default function setReturnTo({ to, next, stores }) {
const { user } = stores
const startPoint = useStorage(user.$2fauth.prefix + 'returnTo', 'accounts')
startPoint.value = to.name
const returnTo = useStorage(user.$2fauth.prefix + 'returnTo', 'accounts')
returnTo.value = to.name
next()
}