[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
|
@ -821,6 +821,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
m.Get("/user/orgs", reqToken(), org.ListMyOrgs)
|
||||
m.Get("/users/:username/orgs", org.ListUserOrgs)
|
||||
m.Post("/orgs", reqToken(), bind(api.CreateOrgOption{}), org.Create)
|
||||
m.Get("/orgs", org.GetAll)
|
||||
m.Group("/orgs/:orgname", func() {
|
||||
m.Combo("").Get(org.Get).
|
||||
Patch(reqToken(), reqOrgOwnership(), bind(api.EditOrgOption{}), org.Edit).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue