mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-22 06:49:35 +00:00
Enabled header
This commit is contained in:
1 parent
032f045854
commit
f04a2b7c55
10 files changed
+25
-24
No files matched your search
@@ -21,7 +21,7 @@ export default {
|
||||
async get_data(url: string, config?: any) {
|
||||
return axios.get(url, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async get_auth_data(url: string, config?: any) {
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
|
||||
return axios.get(url, config)
|
||||
.then(response => Promise.resolve(response.data.data))
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async post(url: string, params = null, config?: any) {
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
|
||||
return axios.post(url, params, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async post_auth_data(url: string, params = null, config?: any) {
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
|
||||
return axios.post(url, params, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async delete(url: string, config?: any) {
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
async delete_data(url: string, config?: any) {
|
||||
return axios.delete(url, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async delete_auth_data(url: string, config?: any) {
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
|
||||
return axios.delete(url, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async patch(url: string, params = null, config?: any) {
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
async patch_data(url: string, params = null, config?: any) {
|
||||
return axios.patch(url, params, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async patch_auth_data(url: string, params = null, config?: any) {
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
|
||||
return axios.patch(url, params, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async put(url: string, params = null, config?: any) {
|
||||
@@ -135,7 +135,7 @@ export default {
|
||||
async put_data(url: string, params = null, config?: any) {
|
||||
return axios.put(url, params, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
async put_auth_data(url: string, params = null, config?: any) {
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
|
||||
return axios.put(url, params, config)
|
||||
.then(response => response.data.data)
|
||||
.catch(error => Promise.reject(error.response))
|
||||
.catch(error => Promise.reject(error.response || error))
|
||||
},
|
||||
|
||||
_config(config: any) {
|
||||
|
||||
Reference in new issue
Block a user