diff --git a/doc/api/users.md b/doc/api/users.md index c05bcb3..ee5e98a 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -1,6 +1,7 @@ ## List users Get a list of users. +This function takes pagination parameters `page` and `per_page` to restrict the list of users. ``` GET /users diff --git a/lib/api/users.rb b/lib/api/users.rb index 125a862..4198387 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -12,6 +12,7 @@ module Gitlab @users = User.scoped @users = @users.active if params[:active].present? @users = @users.search(params[:search]) if params[:search].present? + @users = paginate @users present @users, with: Entities::User end -- libgit2 0.21.2