mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Axios] Edited post and patch payloads
This commit is contained in:
1 parent
9d1fd6c16b
commit
647125e7fd
1 file changed
+4
-4
@@ -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))
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user