Refactor success and error messages
This commit is contained in:
parent
ab4edc17de
commit
cdc805c8da
55 changed files with 219 additions and 256 deletions
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Reference in a new issue