diff options
Diffstat (limited to 'lib/api/access_requests.rb')
-rw-r--r-- | lib/api/access_requests.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/api/access_requests.rb b/lib/api/access_requests.rb index 9c41d8aaa3e..d02b469dac8 100644 --- a/lib/api/access_requests.rb +++ b/lib/api/access_requests.rb @@ -18,10 +18,9 @@ module API source = find_source(source_type, params[:id]) authorize_admin_source!(source_type, source) - access_requesters = source.requesters - users = Kaminari.paginate_array(access_requesters.map(&:user)) + access_requesters = paginate(source.requesters.includes(:user)) - present paginate(users), with: Entities::AccessRequester, source: source + present access_requesters.map(&:user), with: Entities::AccessRequester, access_requesters: access_requesters end # Request access to the group/project |