Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-09-20 21:03:53 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-09-20 21:03:53 +0300
commitee3cf5d6f3d5a3631fa7e94a242f2dfe9b38a935 (patch)
tree855937f227caaac46688dca63f82a18598be778b /app/controllers/projects/registry
parent6c63520ef5735e56749c77b495f8137a20942504 (diff)
[ci skip] Adds tests to vuex and collapsibe component
Formats dates Fixes clipboard button Simplifies HTML
Diffstat (limited to 'app/controllers/projects/registry')
-rw-r--r--app/controllers/projects/registry/repositories_controller.rb28
1 files changed, 21 insertions, 7 deletions
diff --git a/app/controllers/projects/registry/repositories_controller.rb b/app/controllers/projects/registry/repositories_controller.rb
index 89093e4172a..952081a349f 100644
--- a/app/controllers/projects/registry/repositories_controller.rb
+++ b/app/controllers/projects/registry/repositories_controller.rb
@@ -10,7 +10,7 @@ module Projects
respond_to do |format|
format.html
format.json do
- # render json: @images
+ # Remove code below
render json: [
{
name: 'gitlab-org/omnibus-gitlab/foo',
@@ -41,13 +41,27 @@ module Projects
def destroy
if image.destroy
- redirect_to project_container_registry_index_path(@project),
- status: 302,
- notice: 'Image repository has been removed successfully!'
+ respond_to do |format|
+ # TODO: @Kamil, I don't think this is used ever. Should we keep it or remove it?
+ format.html do
+ redirect_to project_container_registry_index_path(@project),
+ status: 302,
+ notice: 'Image repository has been removed successfully!'
+ end
+
+ format.json { head :no_content }
+ end
else
- redirect_to project_container_registry_index_path(@project),
- status: 302,
- alert: 'Failed to remove image repository!'
+ respond_to do |format|
+ # TODO: @Kamil, I don't think this is used ever. Should we keep it or remove it?
+ format.html do
+ redirect_to project_container_registry_index_path(@project),
+ status: 302,
+ alert: 'Failed to remove image repository!'
+ end
+
+ format.json { head :no_content }
+ end
end
end