summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-10-23 03:57:51 +0300
committerStan Hu <stanhu@gmail.com>2017-10-23 04:02:01 +0300
commit3e81c5006cb37f31be15e73cf0b2a525834d7800 (patch)
tree34b46519f314c901e872e096761992ae9aac7d78
parent40ded704cc9b535bee9afd45512d52173c3fc0e7 (diff)
downloadgitlab-ce-3e81c5006cb37f31be15e73cf0b2a525834d7800.tar.gz
Fix deletion of container registry or images returning an error
A successful DELETE call would result in a 204 No Content result, which would have an empty response body. Don't automatically try to parse this value as JSON both because there is no additional information passed in the response body. Closes #39354
-rw-r--r--app/assets/javascripts/registry/stores/actions.js6
-rw-r--r--changelogs/unreleased/sh-fix-container-registry-destroy.yml5
2 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/registry/stores/actions.js b/app/assets/javascripts/registry/stores/actions.js
index 34ed40b8b65..795b39bb3dc 100644
--- a/app/assets/javascripts/registry/stores/actions.js
+++ b/app/assets/javascripts/registry/stores/actions.js
@@ -29,11 +29,9 @@ export const fetchList = ({ commit }, { repo, page }) => {
});
};
-export const deleteRepo = ({ commit }, repo) => Vue.http.delete(repo.destroyPath)
- .then(res => res.json());
+export const deleteRepo = ({ commit }, repo) => Vue.http.delete(repo.destroyPath);
-export const deleteRegistry = ({ commit }, image) => Vue.http.delete(image.destroyPath)
- .then(res => res.json());
+export const deleteRegistry = ({ commit }, image) => Vue.http.delete(image.destroyPath);
export const setMainEndpoint = ({ commit }, data) => commit(types.SET_MAIN_ENDPOINT, data);
export const toggleLoading = ({ commit }) => commit(types.TOGGLE_MAIN_LOADING);
diff --git a/changelogs/unreleased/sh-fix-container-registry-destroy.yml b/changelogs/unreleased/sh-fix-container-registry-destroy.yml
new file mode 100644
index 00000000000..21a463da62a
--- /dev/null
+++ b/changelogs/unreleased/sh-fix-container-registry-destroy.yml
@@ -0,0 +1,5 @@
+---
+title: Fix deletion of container registry or images returning an error
+merge_request:
+author:
+type: fixed