Commit 880cb8aa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Paginate users in users api

parent 771b5c22
## List users
Get a list of users.
This function takes pagination parameters `page` and `per_page` to restrict the list of users.
```
GET /users
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment