diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-11-19 23:24:07 -0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-20 15:24:07 +0800 |
commit | c3b6383b3a91e476c5a6978a0fb355191271a51c (patch) | |
tree | b2111b8ae76b875a653033c1e7686d4cbdb38541 /routers/api/v1/api.go | |
parent | 876bafb7ef8570e62de026b999acd05556fceaee (diff) | |
download | gitea-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.go | 7 |
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() { |