Skip to content

Commit

Permalink
Merge pull request #119 from AlicxSSH/adding-query-parqmeters-for-Sea…
Browse files Browse the repository at this point in the history
…rchUsers

adding the missing query parameters for SearchUsers()
  • Loading branch information
iljaSL authored Jun 21, 2022
2 parents 507b669 + 84080b7 commit f7c3b62
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/rolestore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,17 @@ func (store *RoleStore) ResolveUser(userID string) (*User, error) {

// SearchUsers searches for users, matching the keywords and source
// criteria.
func (store *RoleStore) SearchUsers(searchBody UserSearchObject) ([]User, error) {
func (store *RoleStore) SearchUsers(offset, limit int, sortkey, sortdir string, searchBody UserSearchObject) ([]User, error) {
result := usersResult{}
filters := Params{
Offset: offset,
Limit: limit,
Sortkey: sortkey,
Sortdir: sortdir,
}
_, err := store.api.
URL("/role-store/api/v1/users/search").
Query(&filters).
Post(searchBody, &result)

return result.Items, err
Expand Down

0 comments on commit f7c3b62

Please sign in to comment.