From 647125e7fd516209c00319b2b036cc46d37ce644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Glasn=C3=A1k?= Date: Tue, 31 Jan 2023 15:57:26 +0100 Subject: [PATCH] [Axios] Edited post and patch payloads --- app/src/plugins/w/axios/models/axios.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/plugins/w/axios/models/axios.ts b/app/src/plugins/w/axios/models/axios.ts index 424188e..d379522 100644 --- a/app/src/plugins/w/axios/models/axios.ts +++ b/app/src/plugins/w/axios/models/axios.ts @@ -91,7 +91,7 @@ export default { }, async patch(url: string, params = null, config?: any) { - return axios.patch(url, params, config) + return axios.patch(url, {data: params}, config) .then(response => response.data) .catch(error => Promise.reject(error)) }, @@ -99,13 +99,13 @@ export default { async patch_auth(url: string, params = null, config?: any) { config = this._config(config) - return axios.patch(url, params, config) + return axios.patch(url, {data: params}, config) .then(response => response.data) .catch(error => Promise.reject(error)) }, async patch_data(url: string, params = null, config?: any) { - return axios.patch(url, params, config) + return axios.patch(url, {data: params}, config) .then(response => response.data.data) .catch(error => Promise.reject(error.response || error)) }, @@ -113,7 +113,7 @@ export default { async patch_auth_data(url: string, params = null, config?: any) { config = this._config(config) - return axios.patch(url, params, config) + return axios.patch(url, {data: params}, config) .then(response => response.data.data) .catch(error => Promise.reject(error.response || error)) },