Commit 3cc07e7e authored by Sean McGivern's avatar Sean McGivern Committed by Fatih Acet

Fix resolve_conflicts endpoint

parent 3b84cfdc
...@@ -152,10 +152,9 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -152,10 +152,9 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def resolve_conflicts def resolve_conflicts
begin begin
Gitlab::Conflict::FileCollection.new(@merge_request).resolve_conflicts!(params[:merge_request], nil, user: current_user) Gitlab::Conflict::FileCollection.new(@merge_request).resolve_conflicts!(params, user: current_user)
redirect_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), head :ok
notice: 'Merge conflicts resolved. The merge request can now be merged.'
rescue Gitlab::Conflict::File::MissingResolution => e rescue Gitlab::Conflict::File::MissingResolution => e
render status: :bad_request, json: { message: e.message } render status: :bad_request, json: { message: e.message }
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