aboutsummaryrefslogtreecommitdiffstats
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.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index ce0452a247..eb15acc313 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -259,6 +259,11 @@ func RegisterRoutes(m *macaron.Macaron) {
Delete(repo.ClearIssueLabels)
m.Delete("/:id", repo.DeleteIssueLabel)
})
+ m.Group("/milestone", func() {
+ m.Combo("").Get(repo.GetIssueMilestone).
+ Post(bind(api.SetIssueMilestoneOption{}), repo.SetIssueMilestone).
+ Delete(repo.DeleteIssueMilestone)
+ })
})
}, mustEnableIssues)
@@ -268,6 +273,13 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Combo("/:id").Get(repo.GetLabel).Patch(bind(api.EditLabelOption{}), repo.EditLabel).
Delete(repo.DeleteLabel)
})
+ m.Group("/milestones", func() {
+ m.Combo("").Get(repo.ListMilestones).
+ Post(bind(api.CreateMilestoneOption{}), repo.CreateMilestone)
+ m.Combo("/:id").Get(repo.GetMilestone).Patch(bind(api.EditMilestoneOption{}), repo.EditMilestone).
+ Delete(repo.DeleteMilestone)
+ m.Post("/:id/:action", repo.ChangeMilestoneStatus)
+ })
}, repoAssignment())
}, reqToken())