Skip to content
Snippets Groups Projects
Commit ab153302 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Add catching error and dispatching FetchRelays

parent 02ea80c7
Branches
No related tags found
No related merge requests found
Pipeline #19017 passed
......@@ -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')
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment