summaryrefslogtreecommitdiffstats
path: root/model/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/client.go')
-rw-r--r--model/client.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/model/client.go b/model/client.go
index e9d6c512c..02c6ac9b2 100644
--- a/model/client.go
+++ b/model/client.go
@@ -572,10 +572,8 @@ func (c *Client) GetProfilesByIds(userIds []string) (*Result, *AppError) {
// SearchUsers returns a list of users that have a username matching or similar to the search term. Must
// be authenticated.
-func (c *Client) SearchUsers(term string, teamId string, options map[string]string) (*Result, *AppError) {
- options["term"] = term
- options["team_id"] = teamId
- if r, err := c.DoApiPost("/users/search", MapToJson(options)); err != nil {
+func (c *Client) SearchUsers(params UserSearch) (*Result, *AppError) {
+ if r, err := c.DoApiPost("/users/search", params.ToJson()); err != nil {
return nil, err
} else {
defer closeBody(r)