From 3bd8d119ba88e940932eca50be406d50d73040fb Mon Sep 17 00:00:00 2001 From: Pitu Date: Wed, 24 Apr 2019 08:36:28 +0000 Subject: Refactor a bit since we globally catch API exceptions --- src/site/pages/dashboard/settings.vue | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/site/pages/dashboard/settings.vue') diff --git a/src/site/pages/dashboard/settings.vue b/src/site/pages/dashboard/settings.vue index 23635ed..8aea325 100644 --- a/src/site/pages/dashboard/settings.vue +++ b/src/site/pages/dashboard/settings.vue @@ -151,13 +151,8 @@ export default { }, methods: { async getSettings() { - try { - const response = await this.$axios.$get(`service/config`); - this.options = response.config; - console.log(this.options); - } catch (error) { - this.$onPromiseError(error); - } + const response = await this.$axios.$get(`service/config`); + this.options = response.config; }, promptRestartService() { this.$dialog.confirm({ @@ -166,13 +161,8 @@ export default { }); }, async restartService() { - try { - const response = await this.$axios.$post(`service/restart`); - this.$toast.open(response.message); - return; - } catch (error) { - this.$onPromiseError(error); - } + const response = await this.$axios.$post(`service/restart`); + this.$toast.open(response.message); } } }; -- cgit v1.2.3