diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-28 19:31:17 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-03 16:57:48 +0200 |
commit | 3158f57dba6dcef3e586ae8fced7deb6fdbd6dc0 (patch) | |
tree | 51c000c699b1199f3838c3c46c5ac5dbe16773bd /lib/api/access_requests.rb | |
parent | 958815a039af68dc68b333b69b3e9e3f3bc4ee2e (diff) | |
download | gitlab-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.rb | 4 |
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 |