diff options
| author | taehoon <th.dev91@gmail.com> | 2019-04-27 09:36:10 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-05-15 12:04:26 -0400 |
| commit | 2af088969a26f8a3063336cc3885c10441087e81 (patch) | |
| tree | a3239de2b02f7fd2d1d37401a65653b91704201e /src/components/extra_buttons/extra_buttons.js | |
| parent | 12f8269f0136b00319ef5fe58ae98848fc9d8059 (diff) | |
improve error handling logic
Diffstat (limited to 'src/components/extra_buttons/extra_buttons.js')
| -rw-r--r-- | src/components/extra_buttons/extra_buttons.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 51892d0d..f70ecd1d 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -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 |
