From 2af088969a26f8a3063336cc3885c10441087e81 Mon Sep 17 00:00:00 2001 From: taehoon Date: Sat, 27 Apr 2019 09:36:10 -0400 Subject: improve error handling logic --- src/components/extra_buttons/extra_buttons.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/components/extra_buttons/extra_buttons.js') 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 -- cgit v1.2.3-70-g09d2