diff options
author | 6543 <6543@obermui.de> | 2022-01-05 05:51:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 05:51:12 +0100 |
commit | ec6cc38c6c26f95748be4a9041da2a9528e3625d (patch) | |
tree | 8ac98a32ab06fec2c92462e2af9de9c1b6d16c45 /vendor/code.gitea.io/sdk/gitea/user_search.go | |
parent | 8760af752abd94f050c6014c8cfa3cb6a6c854b7 (diff) | |
download | gitea-ec6cc38c6c26f95748be4a9041da2a9528e3625d.tar.gz gitea-ec6cc38c6c26f95748be4a9041da2a9528e3625d.zip |
code.gitea.io/sdk/gitea v0.14.0 -> v0.15.1 (#18186)
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/user_search.go')
-rw-r--r-- | vendor/code.gitea.io/sdk/gitea/user_search.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/user_search.go b/vendor/code.gitea.io/sdk/gitea/user_search.go index 7e4064d18e..5ea0c45f81 100644 --- a/vendor/code.gitea.io/sdk/gitea/user_search.go +++ b/vendor/code.gitea.io/sdk/gitea/user_search.go @@ -34,11 +34,15 @@ func (opt *SearchUsersOption) QueryEncode() string { return query.Encode() } -// SearchUsers finds users by query -func (c *Client) SearchUsers(opt SearchUsersOption) ([]*User, *Response, error) { +func (c *Client) searchUsers(rawQuery string) ([]*User, *Response, error) { link, _ := url.Parse("/users/search") - link.RawQuery = opt.QueryEncode() + link.RawQuery = rawQuery userResp := new(searchUsersResponse) resp, err := c.getParsedResponse("GET", link.String(), nil, nil, &userResp) return userResp.Users, resp, err } + +// SearchUsers finds users by query +func (c *Client) SearchUsers(opt SearchUsersOption) ([]*User, *Response, error) { + return c.searchUsers(opt.QueryEncode()) +} |