Fix dynamic route requests, add auth middleware

This commit is contained in:
advplyr 2021-08-23 19:37:40 -05:00
parent 7ef977b783
commit db2f2d6660
11 changed files with 29 additions and 25 deletions

View file

@ -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()
}