From 89086a8003b6736ce7a8a99aeed8f8c9af938c8e Mon Sep 17 00:00:00 2001 From: axolotle Date: Mon, 22 Mar 2021 16:34:08 +0100 Subject: [PATCH] update apps api routes --- app/src/views/app/AppActions.vue | 2 +- app/src/views/app/AppCatalog.vue | 2 +- app/src/views/app/AppConfigPanel.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/views/app/AppActions.vue b/app/src/views/app/AppActions.vue index 729f0835..51a64e5f 100644 --- a/app/src/views/app/AppActions.vue +++ b/app/src/views/app/AppActions.vue @@ -100,7 +100,7 @@ export default { // FIXME api expects at least one argument ?! (fake one given with { dontmindthis } ) const args = objectToParams(action.form ? formatFormData(action.form) : { dontmindthis: undefined }) - api.put(`apps/${this.id}/actions/${action.id}`, { args }).then(response => { + api.put(`apps/${this.id}/actions/${action.id}`, { args }).then(() => { this.$refs.view.fetchQueries() }).catch(err => { if (err.name !== 'APIBadRequestError') throw err diff --git a/app/src/views/app/AppCatalog.vue b/app/src/views/app/AppCatalog.vue index 227c035d..2f495942 100644 --- a/app/src/views/app/AppCatalog.vue +++ b/app/src/views/app/AppCatalog.vue @@ -164,7 +164,7 @@ export default { data () { return { queries: [ - ['GET', 'appscatalog?full&with_categories'] + ['GET', 'apps/catalog?full&with_categories'] ], // Data diff --git a/app/src/views/app/AppConfigPanel.vue b/app/src/views/app/AppConfigPanel.vue index 3edc1672..eac466b0 100644 --- a/app/src/views/app/AppConfigPanel.vue +++ b/app/src/views/app/AppConfigPanel.vue @@ -103,7 +103,7 @@ export default { applyConfig (id_) { const args = objectToParams(formatFormData(this.forms[id_])) - api.post(`apps/${this.id}/config`, { args }).then(response => { + api.put(`apps/${this.id}/config`, { args }).then(response => { console.log('SUCCESS', response) }).catch(err => { if (err.name !== 'APIBadRequestError') throw err