Fix not updating list name in store when changing it

This commit is contained in:
kolaente 2021-05-26 16:46:16 +02:00
parent 912cb66970
commit 9d818921a7
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
4 changed files with 28 additions and 25 deletions

View file

@ -45,7 +45,7 @@ export default {
this.listDuplicateService.create(listDuplicate)
.then(r => {
this.$store.commit('namespaces/addListToNamespace', r.list)
this.$store.commit('lists/addList', r.list)
this.$store.commit('lists/setList', r.list)
this.success({message: 'The list was successfully duplicated.'}, this)
this.$router.push({name: 'list.index', params: {listId: r.list.id}})
})

View file

@ -113,9 +113,8 @@ export default {
})
},
save() {
this.listService.update(this.list)
.then(r => {
this.$store.commit('namespaces/setListInNamespaceById', r)
this.$store.dispatch('lists/updateList', this.list)
.then(() => {
this.success({message: 'The list was successfully updated.'}, this)
this.$router.back()
})