mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-02 05:24:58 +02:00
Fix dynamic route requests, add auth middleware
This commit is contained in:
parent
7ef977b783
commit
db2f2d6660
11 changed files with 29 additions and 25 deletions
6
client/middleware/authenticated.js
Normal file
6
client/middleware/authenticated.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
export default function ({ store, redirect, route }) {
|
||||
// If the user is not authenticated
|
||||
if (!store.state.user.user) {
|
||||
return redirect(`/login?redirect=${route.path}`)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue