summaryrefslogtreecommitdiff
path: root/lib/api/access_requests.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-28 19:31:17 +0200
committerRémy Coutable <remy@rymai.me>2016-10-03 16:57:48 +0200
commit3158f57dba6dcef3e586ae8fced7deb6fdbd6dc0 (patch)
tree51c000c699b1199f3838c3c46c5ac5dbe16773bd /lib/api/access_requests.rb
parent958815a039af68dc68b333b69b3e9e3f3bc4ee2e (diff)
downloadgitlab-ce-3158f57dba6dcef3e586ae8fced7deb6fdbd6dc0.tar.gz
Improve Members::DestroyService
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/access_requests.rb')
-rw-r--r--lib/api/access_requests.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/access_requests.rb b/lib/api/access_requests.rb
index 7b9de7c9598..75be24efd59 100644
--- a/lib/api/access_requests.rb
+++ b/lib/api/access_requests.rb
@@ -75,9 +75,7 @@ module API
required_attributes! [:user_id]
source = find_source(source_type, params[:id])
- access_requester = source.requesters.find_by!(user_id: params[:user_id])
-
- ::Members::DestroyService.new(access_requester, current_user).execute
+ ::Members::DestroyService.new(source, current_user, declared(params)).execute(:requesters)
end
end
end