1
0

fix: namespace archive success message

This commit is contained in:
kolaente
2022-01-26 14:41:41 +01:00
parent 78ad9becf3
commit 8b90b8f6a8
2 changed files with 4 additions and 2 deletions

View File

@ -37,12 +37,13 @@ export default {
methods: {
async archiveNamespace() {
try {
const isArchived = !this.namespace.isArchived
const namespace = await this.namespaceService.update({
...this.namespace,
isArchived: !this.namespace.isArchived,
isArchived,
})
this.$store.commit('namespaces/setNamespaceById', namespace)
this.$message.success({message: this.$t('namespace.archive.success')})
this.$message.success({message: this.$t(isArchived ? 'namespace.archive.success' : 'namespace.archive.unarchiveSuccess')})
} finally {
this.$router.back()
}