diff options
author | lstahlman <lstahlman@users.noreply.github.com> | 2016-08-24 15:18:56 -0700 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-08-24 15:18:56 -0700 |
commit | 84b56c3c53fb931f569f9d0b5e2bf3832aba6abe (patch) | |
tree | 77bb6feadb72af31f73f04c244d6c3fbe7bb0892 /routers/api/v1/api.go | |
parent | 06602a84ff0ed352c8998cc3ca9ff0350e0906ef (diff) |
Additional API support for milestones (#3383)
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index ce0452a2..eb15acc3 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()) |