mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[Merge] API
This commit is contained in:
commit
9d1fd6c16b
11 files changed
+35
-34
No files matched your search
@@ -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))
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user