Commit c71ba7c0 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'remove_unnecessary_respond' into 'master'

Remove unnecessary html respond

See merge request gitlab-org/gitlab!83533
parents de25e22c 14e81769
...@@ -43,12 +43,7 @@ class Projects::RefsController < Projects::ApplicationController ...@@ -43,12 +43,7 @@ class Projects::RefsController < Projects::ApplicationController
end end
def logs_tree def logs_tree
tree_summary = ::Gitlab::TreeSummary.new(
@commit, @project, current_user,
path: @path, offset: permitted_params[:offset], limit: 25)
respond_to do |format| respond_to do |format|
format.html { render_404 }
format.json do format.json do
logs, next_offset = tree_summary.fetch_logs logs, next_offset = tree_summary.fetch_logs
...@@ -61,6 +56,13 @@ class Projects::RefsController < Projects::ApplicationController ...@@ -61,6 +56,13 @@ class Projects::RefsController < Projects::ApplicationController
private private
def tree_summary
::Gitlab::TreeSummary.new(
@commit, @project, current_user,
path: @path, offset: permitted_params[:offset], limit: 25
)
end
def validate_ref_id def validate_ref_id
return not_found if permitted_params[:id].present? && permitted_params[:id] !~ Gitlab::PathRegex.git_reference_regex return not_found if permitted_params[:id].present? && permitted_params[:id] !~ Gitlab::PathRegex.git_reference_regex
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