Refactor success and error messages
This commit is contained in:
@ -110,7 +110,7 @@ export default {
|
||||
this.$store.dispatch('namespaces/loadNamespaces')
|
||||
this.$router.push({name: 'list.index', params: {listId: r.getListId()}})
|
||||
})
|
||||
.catch(e => this.error(e, this))
|
||||
.catch(e => this.error(e))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ export default {
|
||||
this.filterService.delete(filter)
|
||||
.then(() => {
|
||||
this.$store.dispatch('namespaces/loadNamespaces')
|
||||
this.success({message: 'The filter was deleted successfully.'}, this)
|
||||
this.success({message: 'The filter was deleted successfully.'})
|
||||
this.$router.push({name: 'namespaces.index'})
|
||||
})
|
||||
.catch(e => this.error(e, this))
|
||||
.catch(e => this.error(e))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -110,19 +110,19 @@ export default {
|
||||
this.filter = r
|
||||
this.filters = objectToSnakeCase(this.filter.filters)
|
||||
})
|
||||
.catch(e => this.error(e, this))
|
||||
.catch(e => this.error(e))
|
||||
},
|
||||
save() {
|
||||
this.filter.filters = this.filters
|
||||
this.filterService.update(this.filter)
|
||||
.then(r => {
|
||||
this.$store.dispatch('namespaces/loadNamespaces')
|
||||
this.success({message: 'The filter was saved successfully.'}, this)
|
||||
this.success({message: 'The filter was saved successfully.'})
|
||||
this.filter = r
|
||||
this.filters = objectToSnakeCase(this.filter.filters)
|
||||
this.$router.back()
|
||||
})
|
||||
.catch(e => this.error(e, this))
|
||||
.catch(e => this.error(e))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user