users: adds search and pagination (#7753)

ref #7469. Follow up change that adds proper paging with 50 results
per page as well as a search box to search by name, login or email.
This commit is contained in:
Daniel Lee
2017-03-07 16:03:54 +01:00
committed by Torkel Ödegaard
parent 8e3f22d307
commit 9efb6e76e9
5 changed files with 73 additions and 6 deletions

View File

@ -239,7 +239,9 @@ func searchUser(c *middleware.Context) (*m.SearchUsersQuery, error) {
page = 1
}
query := &m.SearchUsersQuery{Query: "", Page: page, Limit: perPage}
searchQuery := c.Query("query")
query := &m.SearchUsersQuery{Query: searchQuery, Page: page, Limit: perPage}
if err := bus.Dispatch(query); err != nil {
return nil, err
}