From e7fd65f0cf748201e70f7a8de089275099890f63 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 3 Aug 2016 11:51:22 -0700 Subject: #3290 better code structure and batch minor improvements --- routers/api/v1/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/api/v1/api.go') diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 80131af6cd..e4398458f5 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -244,7 +244,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/:index", func() { m.Combo("").Get(repo.GetIssue).Patch(bind(api.EditIssueOption{}), repo.EditIssue) m.Group("/labels", func() { - m.Combo("").Get(repo.GetIssueLabels). + m.Combo("").Get(repo.ListIssueLabels). Post(bind(api.IssueLabelsOption{}), repo.AddIssueLabels). Put(bind(api.IssueLabelsOption{}), repo.ReplaceIssueLabels). Delete(repo.ClearIssueLabels) @@ -255,8 +255,8 @@ func RegisterRoutes(m *macaron.Macaron) { }) m.Group("/labels", func() { m.Combo("").Get(repo.ListLabels). - Post(bind(api.LabelOption{}), repo.CreateLabel) - m.Combo("/:id").Get(repo.GetLabel).Patch(bind(api.LabelOption{}), repo.EditLabel). + Post(bind(api.CreateLabelOption{}), repo.CreateLabel) + m.Combo("/:id").Get(repo.GetLabel).Patch(bind(api.EditLabelOption{}), repo.EditLabel). Delete(repo.DeleteLabel) }) }, RepoAssignment()) -- cgit v1.2.3