summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 744289ac0d..08e6a75153 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -205,7 +205,10 @@ func RegisterRoutes(m *macaron.Macaron) {
// Organizations
m.Get("/user/orgs", ReqToken(), org.ListMyOrgs)
m.Get("/users/:username/orgs", org.ListUserOrgs)
- m.Combo("/orgs/:orgname").Get(org.Get).Patch(bind(api.EditOrgOption{}), org.Edit)
+ m.Group("/orgs/:orgname", func() {
+ m.Combo("").Get(org.Get).Patch(bind(api.EditOrgOption{}), org.Edit)
+ m.Combo("/teams").Get(org.ListTeams)
+ })
m.Any("/*", func(ctx *context.Context) {
ctx.Error(404)
@@ -225,7 +228,7 @@ func RegisterRoutes(m *macaron.Macaron) {
})
m.Group("/orgs/:orgname", func() {
- m.Combo("/teams").Get(admin.ListTeams).Post(bind(api.CreateTeamOption{}), admin.CreateTeam)
+ m.Combo("/teams").Post(bind(api.CreateTeamOption{}), admin.CreateTeam)
})
}, ReqAdmin())
}, context.APIContexter())