aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-08-30 20:00:59 +0200
committerGitHub <noreply@github.com>2021-08-30 14:00:59 -0400
commit73394f435c4a15b9d2ef5449213254f12fb34e1d (patch)
tree5ad44cc1e1938b1c6ed9059b0140314c35ee7b70 /routers/api/v1/user
parent06b9d553bc02f88553ced9822c55ae901e2ac28e (diff)
downloadgitea-73394f435c4a15b9d2ef5449213254f12fb34e1d.tar.gz
gitea-73394f435c4a15b9d2ef5449213254f12fb34e1d.zip
[API] List limited and private orgs if authentificated (#16866)
* fix bug #16785 and similar * code format * CI.restart()
Diffstat (limited to 'routers/api/v1/user')
-rw-r--r--routers/api/v1/user/user.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go
index a5e70de548..535a49d766 100644
--- a/routers/api/v1/user/user.go
+++ b/routers/api/v1/user/user.go
@@ -54,15 +54,13 @@ func Search(ctx *context.APIContext) {
listOptions := utils.GetListOptions(ctx)
- opts := &models.SearchUserOptions{
+ users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{
Actor: ctx.User,
Keyword: ctx.FormTrim("q"),
UID: ctx.FormInt64("uid"),
Type: models.UserTypeIndividual,
ListOptions: listOptions,
- }
-
- users, maxResults, err := models.SearchUsers(opts)
+ })
if err != nil {
ctx.JSON(http.StatusInternalServerError, map[string]interface{}{
"ok": false,