[Merge] API

This commit is contained in:
Matej Glasnák committed 2023-01-31 15:56:25 +01:00
commit 9d1fd6c16b
11 files changed
+35 -34

No files matched your search

+4 -4
View File
@@ -34,7 +34,7 @@ export default {
async post(url: string, params = null, config?: any) {
return axios.post(url, params, config)
return axios.post(url, {data: params}, config)
.then(response => response.data)
.catch(error => Promise.reject(error))
},
@@ -42,14 +42,14 @@ export default {
async post_auth(url: string, params = null, config?: any) {
config = this._config(config)
return axios.post(url, params, config)
return axios.post(url, {data: params}, config)
.then(response => response.data)
.catch(error => Promise.reject(error))
},
async post_data(url: string, params = null, config?: any) {
return axios.post(url, params, config)
return axios.post(url, {data: params}, config)
.then(response => response.data.data)
.catch(error => Promise.reject(error.response || error))
},
@@ -57,7 +57,7 @@ export default {
async post_auth_data(url: string, params = null, config?: any) {
config = this._config(config)
return axios.post(url, params, config)
return axios.post(url, {data: params}, config)
.then(response => response.data.data)
.catch(error => Promise.reject(error.response || error))
},