summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-03 11:51:22 -0700
committerUnknwon <u@gogs.io>2016-08-03 11:51:22 -0700
commite7fd65f0cf748201e70f7a8de089275099890f63 (patch)
tree4158ce20ccc3106ea84656678bf062bd164ad9b3 /routers/api/v1/api.go
parent2eeb0ec9b032ea02d315922feb762637ecd9ddc8 (diff)
downloadgitea-e7fd65f0cf748201e70f7a8de089275099890f63.tar.gz
gitea-e7fd65f0cf748201e70f7a8de089275099890f63.zip
#3290 better code structure and batch minor improvements
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go6
1 files changed, 3 insertions, 3 deletions
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())