Commit 3e81c500 authored by Stan Hu's avatar Stan Hu

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
parent 40ded704
......@@ -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);
---
title: Fix deletion of container registry or images returning an error
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment