Commit ab153302 authored by Angelina Filippova's avatar Angelina Filippova

Add catching error and dispatching FetchRelays

parent 02ea80c7
Pipeline #19016 passed with stages
in 4 minutes and 57 seconds
......@@ -51,10 +51,22 @@ export default {
},
methods: {
followRelay() {
this.$store.dispatch('AddRelay', this.newRelay)
try {
this.$store.dispatch('AddRelay', this.newRelay)
} catch (_e) {
return
} finally {
this.$store.dispatch('FetchRelays')
}
},
deleteRelay(relay) {
this.$store.dispatch('DeleteRelay', relay)
try {
this.$store.dispatch('DeleteRelay', relay)
} catch (_e) {
return
} finally {
this.$store.dispatch('FetchRelays')
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment