summaryrefslogtreecommitdiff
path: root/lib/api/members.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-02-16 15:10:22 +0100
committerRémy Coutable <remy@rymai.me>2018-02-27 16:02:22 +0100
commit1c88d92b3fe174a56080575a14d6b473f17f7d8f (patch)
tree7150c48b368e82d70f6bfc228c3d836c7be7c3ac /lib/api/members.rb
parente82f629be4b9c91e2611095cd4296e487ed137ef (diff)
downloadgitlab-ce-1c88d92b3fe174a56080575a14d6b473f17f7d8f.tar.gz
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/members.rb')
-rw-r--r--lib/api/members.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/api/members.rb b/lib/api/members.rb
index 6367cde04bb..8b12986d09e 100644
--- a/lib/api/members.rb
+++ b/lib/api/members.rb
@@ -83,11 +83,9 @@ module API
member = source.members.find_by!(user_id: params[:user_id])
updated_member =
- ::Members::UpdateService.new(
- source,
- current_user,
- declared_params(include_missing: false)
- ).execute(member)
+ ::Members::UpdateService
+ .new(current_user, declared_params(include_missing: false))
+ .execute(member)
if updated_member.valid?
present updated_member, with: Entities::Member
@@ -105,7 +103,7 @@ module API
member = source.members.find_by!(user_id: params[:user_id])
destroy_conditionally!(member) do
- ::Members::DestroyService.new(source, current_user).execute(member)
+ ::Members::DestroyService.new(current_user).execute(member)
end
end
end