Commit 16f7243f authored by Douwe Maan's avatar Douwe Maan

Revert "[Rails5] Set request.format for artifacts_controller"

This reverts commit c48e7dc2.

# Conflicts:
#	app/controllers/projects/artifacts_controller.rb
parent 76bc2f08
...@@ -9,7 +9,6 @@ class Projects::ArtifactsController < Projects::ApplicationController ...@@ -9,7 +9,6 @@ class Projects::ArtifactsController < Projects::ApplicationController
before_action :authorize_read_build! before_action :authorize_read_build!
before_action :authorize_update_build!, only: [:keep] before_action :authorize_update_build!, only: [:keep]
before_action :extract_ref_name_and_path before_action :extract_ref_name_and_path
before_action :set_request_format, only: [:file]
before_action :validate_artifacts!, except: [:download] before_action :validate_artifacts!, except: [:download]
before_action :entry, only: [:file] before_action :entry, only: [:file]
...@@ -110,12 +109,4 @@ class Projects::ArtifactsController < Projects::ApplicationController ...@@ -110,12 +109,4 @@ class Projects::ArtifactsController < Projects::ApplicationController
render_404 unless @entry.exists? render_404 unless @entry.exists?
end end
def set_request_format
request.format = :html if set_request_format?
end
def set_request_format?
request.format != :json
end
end end
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