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, 7 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index eee9440574..e5bb98033b 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -861,6 +861,13 @@ func RegisterRoutes(m *macaron.Macaron) {
Post(reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam)
m.Get("/search", org.SearchTeam)
}, reqOrgMembership())
+ m.Group("/labels", func() {
+ m.Get("", org.ListLabels)
+ m.Post("", reqToken(), reqOrgOwnership(), bind(api.CreateLabelOption{}), org.CreateLabel)
+ m.Combo("/:id").Get(org.GetLabel).
+ Patch(reqToken(), reqOrgOwnership(), bind(api.EditLabelOption{}), org.EditLabel).
+ Delete(reqToken(), reqOrgOwnership(), org.DeleteLabel)
+ })
m.Group("/hooks", func() {
m.Combo("").Get(org.ListHooks).
Post(bind(api.CreateHookOption{}), org.CreateHook)