1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

API Endpoints for organization members (#645)

This commit is contained in:
Ethan Koenig
2017-01-19 19:31:46 -07:00
committed by Lunny Xiao
parent 3c4d5e1ed5
commit fcf02e4961
3 changed files with 155 additions and 2 deletions

View File

@@ -395,6 +395,16 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/users/:username/orgs", org.ListUserOrgs)
m.Group("/orgs/:orgname", func() {
m.Combo("").Get(org.Get).Patch(bind(api.EditOrgOption{}), org.Edit)
m.Group("/members", func() {
m.Get("", org.ListMembers)
m.Combo("/:username").Get(org.IsMember).Delete(org.DeleteMember)
})
m.Group("/public_members", func() {
m.Get("", org.ListPublicMembers)
m.Combo("/:username").Get(org.IsPublicMember).
Put(org.PublicizeMember).
Delete(org.ConcealMember)
})
m.Combo("/teams").Get(org.ListTeams)
m.Group("/hooks", func() {
m.Combo("").Get(org.ListHooks).