1
0

Fix removing a namespace from state after it was deleted

This commit is contained in:
kolaente
2021-05-26 17:39:57 +02:00
parent 188134ae2e
commit 9c799ab161
3 changed files with 12 additions and 5 deletions

View File

@ -29,9 +29,8 @@ export default {
deleteNamespace() {
const namespace = this.$store.getters['namespaces/getNamespaceById'](this.$route.params.id)
this.namespaceService.delete(namespace)
this.$store.dispatch('namespaces/deleteNamespace', namespace)
.then(() => {
this.$store.commit('namespaces/removeNamespaceFromNamespaceById', namespace)
this.success({message: 'The namespace was successfully deleted.'}, this)
this.$router.push({name: 'home'})
})