mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-10 03:11:34 +00:00
feat: unified package
This commit is contained in:
parent
f850db23fe
commit
0f42a4d580
335 changed files with 18102 additions and 19926 deletions
9
middleware/authenticated.js
Normal file
9
middleware/authenticated.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export default function ({ store, redirect, route, app }) {
|
||||
// If the user is not authenticated
|
||||
if (!store.state.user.user) {
|
||||
if (route.name === 'batch' || route.name === 'index') {
|
||||
return redirect('/login')
|
||||
}
|
||||
return redirect(`/login?redirect=${encodeURIComponent(route.fullPath)}`)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue