mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 13:50:39 +00:00
[API] add comments endpoint for single comment (#9494)
* add GET /repos/{owner}/{repo}/issues/comments/{id} and complete error list for swagger in other func * add repo check
This commit is contained in:
parent
c884735740
commit
e88d67b774
4 changed files with 181 additions and 3 deletions
|
@ -661,9 +661,10 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
m.Group("/comments", func() {
|
||||
m.Get("", repo.ListRepoIssueComments)
|
||||
m.Group("/:id", func() {
|
||||
m.Combo("", reqToken()).
|
||||
Patch(mustNotBeArchived, bind(api.EditIssueCommentOption{}), repo.EditIssueComment).
|
||||
Delete(repo.DeleteIssueComment)
|
||||
m.Combo("").
|
||||
Get(repo.GetIssueComment).
|
||||
Patch(mustNotBeArchived, reqToken(), bind(api.EditIssueCommentOption{}), repo.EditIssueComment).
|
||||
Delete(reqToken(), repo.DeleteIssueComment)
|
||||
m.Combo("/reactions").
|
||||
Get(repo.GetIssueCommentReactions).
|
||||
Post(bind(api.EditReactionOption{}), reqToken(), repo.PostIssueCommentReaction).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue