aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea/user_search.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/user_search.go')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/user_search.go10
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())
+}