Fix logout

This commit is contained in:
kolaente 2020-11-01 17:15:48 +01:00
parent 6bc16556cc
commit 35400fcc0a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 12 additions and 4 deletions

View File

@ -156,10 +156,6 @@ export default {
keyboardShortcutsActive: KEYBOARD_SHORTCUTS_ACTIVE,
}),
methods: {
logout() {
this.$store.dispatch('auth/logout')
router.push({name: 'user.login'})
},
loadNamespaces() {
this.$store.dispatch('namespaces/loadNamespaces')
},

View File

@ -38,6 +38,12 @@ export default {
currentList: CURRENT_LIST,
background: 'background',
}),
methods: {
logout() {
this.$store.dispatch('auth/logout')
this.$router.push({name: 'user.login'})
},
},
}
</script>

View File

@ -115,5 +115,11 @@ export default {
privacyPolicyUrl: state => state.config.legal.privacyPolicyUrl,
canWriteCurrentList: state => state.currentList.maxRight > Rights.READ,
}),
methods: {
logout() {
this.$store.dispatch('auth/logout')
this.$router.push({name: 'user.login'})
},
},
}
</script>