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 c57edf6a99..04ff91fbbf 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -802,8 +802,11 @@ func RegisterRoutes(m *macaron.Macaron) {
Put(reqToken(), reqOrgMembership(), org.PublicizeMember).
Delete(reqToken(), reqOrgMembership(), org.ConcealMember)
})
- m.Combo("/teams", reqToken(), reqOrgMembership()).Get(org.ListTeams).
- Post(reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam)
+ m.Group("/teams", func() {
+ m.Combo("", reqToken()).Get(org.ListTeams).
+ Post(reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam)
+ m.Get("/search", org.SearchTeam)
+ }, reqOrgMembership())
m.Group("/hooks", func() {
m.Combo("").Get(org.ListHooks).
Post(bind(api.CreateHookOption{}), org.CreateHook)