aboutsummaryrefslogtreecommitdiff
path: root/src/site/pages/dashboard/settings.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/site/pages/dashboard/settings.vue')
-rw-r--r--src/site/pages/dashboard/settings.vue9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/site/pages/dashboard/settings.vue b/src/site/pages/dashboard/settings.vue
index 02bf5d2..23635ed 100644
--- a/src/site/pages/dashboard/settings.vue
+++ b/src/site/pages/dashboard/settings.vue
@@ -132,6 +132,7 @@ export default {
components: {
Sidebar
},
+ middleware: 'auth',
data() {
return {
options: {}
@@ -151,8 +152,8 @@ export default {
methods: {
async getSettings() {
try {
- const response = await this.axios.get(`${this.config.baseURL}/service/config`);
- this.options = response.data.config;
+ const response = await this.$axios.$get(`service/config`);
+ this.options = response.config;
console.log(this.options);
} catch (error) {
this.$onPromiseError(error);
@@ -166,8 +167,8 @@ export default {
},
async restartService() {
try {
- const response = await this.axios.post(`${this.config.baseURL}/service/restart`);
- this.$toast.open(response.data.message);
+ const response = await this.$axios.$post(`service/restart`);
+ this.$toast.open(response.message);
return;
} catch (error) {
this.$onPromiseError(error);