Remove useless promise transformation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
c5c576addd
commit
9d2a66967b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -91,28 +91,18 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
get(url) {
|
get(url) {
|
||||||
return axios.get(sanitize(url))
|
return axios.get(sanitize(url));
|
||||||
.then((response) => Promise.resolve(response))
|
|
||||||
.catch((error) => Promise.reject(error));
|
|
||||||
},
|
},
|
||||||
post(url, data) {
|
post(url, data) {
|
||||||
return axios.post(sanitize(url), data)
|
return axios.post(sanitize(url), data);
|
||||||
.then((response) => Promise.resolve(response))
|
|
||||||
.catch((error) => Promise.reject(error));
|
|
||||||
},
|
},
|
||||||
patch(url, data) {
|
patch(url, data) {
|
||||||
return axios.patch(sanitize(url), data)
|
return axios.patch(sanitize(url), data);
|
||||||
.then((response) => Promise.resolve(response))
|
|
||||||
.catch((error) => Promise.reject(error));
|
|
||||||
},
|
},
|
||||||
put(url, data) {
|
put(url, data) {
|
||||||
return axios.put(sanitize(url), data)
|
return axios.put(sanitize(url), data);
|
||||||
.then((response) => Promise.resolve(response))
|
|
||||||
.catch((error) => Promise.reject(error));
|
|
||||||
},
|
},
|
||||||
delete(url, data) {
|
delete(url, data) {
|
||||||
return axios.delete(sanitize(url), { data: data })
|
return axios.delete(sanitize(url), { data: data });
|
||||||
.then((response) => Promise.resolve(response))
|
|
||||||
.catch((error) => Promise.reject(error));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in New Issue