summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-11-19 23:24:07 -0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-11-20 15:24:07 +0800
commitc3b6383b3a91e476c5a6978a0fb355191271a51c (patch)
treeb2111b8ae76b875a653033c1e7686d4cbdb38541 /routers/api/v1/api.go
parent876bafb7ef8570e62de026b999acd05556fceaee (diff)
downloadgitea-c3b6383b3a91e476c5a6978a0fb355191271a51c.tar.gz
gitea-c3b6383b3a91e476c5a6978a0fb355191271a51c.zip
Fix comment API paths (#2813)
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index b6e7df1215..2aa27af091 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -406,7 +406,8 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/comments", func() {
m.Get("", repo.ListRepoIssueComments)
m.Combo("/:id", reqToken()).
- Patch(bind(api.EditIssueCommentOption{}), repo.EditIssueComment)
+ Patch(bind(api.EditIssueCommentOption{}), repo.EditIssueComment).
+ Delete(repo.DeleteIssueComment)
})
m.Group("/:index", func() {
m.Combo("").Get(repo.GetIssue).
@@ -415,8 +416,8 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/comments", func() {
m.Combo("").Get(repo.ListIssueComments).
Post(reqToken(), bind(api.CreateIssueCommentOption{}), repo.CreateIssueComment)
- m.Combo("/:id", reqToken()).Patch(bind(api.EditIssueCommentOption{}), repo.EditIssueComment).
- Delete(repo.DeleteIssueComment)
+ m.Combo("/:id", reqToken()).Patch(bind(api.EditIssueCommentOption{}), repo.EditIssueCommentDeprecated).
+ Delete(repo.DeleteIssueCommentDeprecated)
})
m.Group("/labels", func() {