Commit 5a89934a authored by Valeriy Sizov's avatar Valeriy Sizov

API: update merge request call

parent fe59547a
......@@ -33,7 +33,17 @@ module Gitlab
#update merge_request
put ":id/merge_request/:merge_request_id" do
attrs = attributes_for_keys [:source_branch, :target_branch, :assignee_id, :title, :closed]
project = current_user.projects.find(params[:id])
merge_request = project.merge_requests.find(params[:merge_request_id])
if merge_request.update_attributes attrs
merge_request.reload_code
merge_request.mark_as_unchecked
present merge_request, with: Entities::MergeRequest
else
not_found!
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