Commit 880cb8aa487a78c22bedb26b3cfd0e1d8590a932
1 parent
771b5c22
Exists in
master
and in
4 other branches
Paginate users in users api
Showing
2 changed files
with
2 additions
and
0 deletions
Show diff stats
doc/api/users.md
lib/api/users.rb
@@ -12,6 +12,7 @@ module Gitlab | @@ -12,6 +12,7 @@ module Gitlab | ||
12 | @users = User.scoped | 12 | @users = User.scoped |
13 | @users = @users.active if params[:active].present? | 13 | @users = @users.active if params[:active].present? |
14 | @users = @users.search(params[:search]) if params[:search].present? | 14 | @users = @users.search(params[:search]) if params[:search].present? |
15 | + @users = paginate @users | ||
15 | present @users, with: Entities::User | 16 | present @users, with: Entities::User |
16 | end | 17 | end |
17 | 18 |