forked from kevadesu/forgejo
[API] add GET /orgs endpoint (#9560)
* introduce `GET /orgs` * add TEST * show also other VisibleType's * update description * refactor a lot * SearchUserOptions by default return only public
This commit is contained in:
parent
497e15fdc2
commit
10055bd2b1
8 changed files with 108 additions and 9 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/routers"
|
||||
)
|
||||
|
||||
|
@ -25,6 +26,6 @@ func Organizations(ctx *context.Context) {
|
|||
routers.RenderUserSearch(ctx, &models.SearchUserOptions{
|
||||
Type: models.UserTypeOrganization,
|
||||
PageSize: setting.UI.Admin.OrgPagingNum,
|
||||
Private: true,
|
||||
Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate},
|
||||
}, tplOrgs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue