Commit a47565aa authored by James Edwards-Jones's avatar James Edwards-Jones

Updated grape to `1.0.2` to remove workaround

parent 391732a2
...@@ -357,7 +357,7 @@ GEM ...@@ -357,7 +357,7 @@ GEM
signet (~> 0.7) signet (~> 0.7)
gpgme (2.0.13) gpgme (2.0.13)
mini_portile2 (~> 2.1) mini_portile2 (~> 2.1)
grape (1.0.0) grape (1.0.2)
activesupport activesupport
builder builder
mustermann-grape (~> 1.0.0) mustermann-grape (~> 1.0.0)
...@@ -507,7 +507,7 @@ GEM ...@@ -507,7 +507,7 @@ GEM
multi_json (1.13.1) multi_json (1.13.1)
multi_xml (0.6.0) multi_xml (0.6.0)
multipart-post (2.0.0) multipart-post (2.0.0)
mustermann (1.0.0) mustermann (1.0.2)
mustermann-grape (1.0.0) mustermann-grape (1.0.0)
mustermann (~> 1.0.0) mustermann (~> 1.0.0)
mysql2 (0.4.10) mysql2 (0.4.10)
......
...@@ -52,12 +52,7 @@ module API ...@@ -52,12 +52,7 @@ module API
conflict!("Protected branch '#{params[:name]}' already exists") conflict!("Protected branch '#{params[:name]}' already exists")
end end
# Replace with `declared(params)` after updating to grape v1.0.2 api_service = ::ProtectedBranches::ApiService.new(user_project, current_user, declared(params))
# See https://github.com/ruby-grape/grape/pull/1710
# and https://gitlab.com/gitlab-org/gitlab-ce/issues/40843
declared_params = params.slice("name", "push_access_level", "merge_access_level", "allowed_to_push", "allowed_to_merge")
api_service = ::ProtectedBranches::ApiService.new(user_project, current_user, declared_params)
protected_branch = api_service.create protected_branch = api_service.create
if protected_branch.persisted? if protected_branch.persisted?
......
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