1
0

Refactor success and error messages

This commit is contained in:
kolaente
2021-06-22 22:07:57 +02:00
parent ab4edc17de
commit cdc805c8da
55 changed files with 219 additions and 256 deletions

View File

@ -96,10 +96,10 @@ export default {
this.subscriptionService.create(subscription)
.then(() => {
this.$emit('change', subscription)
this.success({message: `You are now subscribed to this ${this.entity}`}, this)
this.success({message: `You are now subscribed to this ${this.entity}`})
})
.catch(e => {
this.error(e, this)
this.error(e)
})
},
unsubscribe() {
@ -110,10 +110,10 @@ export default {
this.subscriptionService.delete(subscription)
.then(() => {
this.$emit('change', null)
this.success({message: `You are now unsubscribed to this ${this.entity}`}, this)
this.success({message: `You are now unsubscribed to this ${this.entity}`})
})
.catch(e => {
this.error(e, this)
this.error(e)
})
}
},