mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 00:10:15 +00:00
[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
|
@ -104,7 +104,7 @@ func GetAllOrgs(ctx *context.APIContext) {
|
|||
OrderBy: models.SearchOrderByAlphabetically,
|
||||
Page: ctx.QueryInt("page"),
|
||||
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
|
||||
Private: true,
|
||||
Visible: []api.VisibleType{api.VisibleTypePublic, api.VisibleTypeLimited, api.VisibleTypePrivate},
|
||||
})
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "SearchOrganizations", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue