mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-06 18:52:43 +02:00
Fix dynamic route requests, add auth middleware
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
middleware: 'authenticated',
|
||||
data() {
|
||||
return {
|
||||
socket: null
|
||||
@@ -140,11 +141,6 @@ export default {
|
||||
this.socket.on('scan_progress', this.scanProgress)
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
if (!this.$store.state.user.user) {
|
||||
this.$router.replace(`/login?redirect=${this.$route.path}`)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initializeSocket()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user