refactor error handling of pinStatus
This commit is contained in:
parent
ce1d19136d
commit
1229622fed
3 changed files with 8 additions and 17 deletions
|
@ -24,11 +24,8 @@ const ExtraButtons = {
|
|||
},
|
||||
pinStatus () {
|
||||
this.refreshPopper()
|
||||
this.$store.dispatch('pinStatus', this.status.id).then((status) => {
|
||||
if (status.error) {
|
||||
this.$emit('onError', status.error)
|
||||
}
|
||||
})
|
||||
this.$store.dispatch('pinStatus', this.status.id)
|
||||
.catch(err => this.$emit('onError', err.error.error))
|
||||
},
|
||||
unpinStatus () {
|
||||
this.refreshPopper()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue