improve error handling logic
This commit is contained in:
parent
12f8269f01
commit
2af088969a
3 changed files with 11 additions and 5 deletions
|
@ -25,11 +25,14 @@ const ExtraButtons = {
|
|||
pinStatus () {
|
||||
this.refreshPopper()
|
||||
this.$store.dispatch('pinStatus', this.status.id)
|
||||
.then(() => this.$emit('onSuccess'))
|
||||
.catch(err => this.$emit('onError', err.error.error))
|
||||
},
|
||||
unpinStatus () {
|
||||
this.refreshPopper()
|
||||
this.$store.dispatch('unpinStatus', this.status.id)
|
||||
.then(() => this.$emit('onSuccess'))
|
||||
.catch(err => this.$emit('onError', err.error.error))
|
||||
},
|
||||
refreshPopper () {
|
||||
this.showPopper = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue