Fix trying to load the current tasks even when not logged in (Fixes #133)
This commit is contained in:
parent
cc46809639
commit
0dc4e6b95d
4 changed files with 19 additions and 15 deletions
|
|
@ -265,6 +265,12 @@
|
|||
router.push({name: 'login'})
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
// Check if the user is already logged in, if so, redirect them to the homepage
|
||||
if (!this.userAuthenticated && this.$route.name !== 'login') {
|
||||
router.push({name: 'login'})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('config/update')
|
||||
this.$store.dispatch('auth/checkAuth')
|
||||
|
|
|
|||
Reference in a new issue