diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-10-08 15:29:37 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-10-08 15:29:37 +0200 |
commit | 9d2a66967bc07c48b33feb4c55a2154510d94ac2 (patch) | |
tree | 41b5aa7f69cb6035415a849ce28430fd1493984b /settings/src | |
parent | c5c576adddaec082b2228e9b0beb29c783a04d51 (diff) | |
download | nextcloud-server-9d2a66967bc07c48b33feb4c55a2154510d94ac2.tar.gz nextcloud-server-9d2a66967bc07c48b33feb4c55a2154510d94ac2.zip |
Remove useless promise transformation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'settings/src')
-rw-r--r-- | settings/src/store/api.js | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/settings/src/store/api.js b/settings/src/store/api.js index e87dabd4931..5bab785d94b 100644 --- a/settings/src/store/api.js +++ b/settings/src/store/api.js @@ -91,28 +91,18 @@ export default { }); }, get(url) { - return axios.get(sanitize(url)) - .then((response) => Promise.resolve(response)) - .catch((error) => Promise.reject(error)); + return axios.get(sanitize(url)); }, post(url, data) { - return axios.post(sanitize(url), data) - .then((response) => Promise.resolve(response)) - .catch((error) => Promise.reject(error)); + return axios.post(sanitize(url), data); }, patch(url, data) { - return axios.patch(sanitize(url), data) - .then((response) => Promise.resolve(response)) - .catch((error) => Promise.reject(error)); + return axios.patch(sanitize(url), data); }, put(url, data) { - return axios.put(sanitize(url), data) - .then((response) => Promise.resolve(response)) - .catch((error) => Promise.reject(error)); + return axios.put(sanitize(url), data); }, delete(url, data) { - return axios.delete(sanitize(url), { data: data }) - .then((response) => Promise.resolve(response)) - .catch((error) => Promise.reject(error)); + return axios.delete(sanitize(url), { data: data }); } };
\ No newline at end of file |