summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_comment.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-24 15:04:31 +0800
committerGitHub <noreply@github.com>2016-11-24 15:04:31 +0800
commit3917ed45de063b4e8868610c82d8172020d572fd (patch)
tree052b7651cbb64ae30f92efe87441ad1d4fa2d922 /routers/api/v1/repo/issue_comment.go
parent3a3782bb7fed768c1e832ff4c0a77f2f5281ed05 (diff)
downloadgitea-3917ed45de063b4e8868610c82d8172020d572fd.tar.gz
gitea-3917ed45de063b4e8868610c82d8172020d572fd.zip
golint fixed for routers (#208)
Diffstat (limited to 'routers/api/v1/repo/issue_comment.go')
-rw-r--r--routers/api/v1/repo/issue_comment.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go
index cf9a3eae0f..06c7d2b1f5 100644
--- a/routers/api/v1/repo/issue_comment.go
+++ b/routers/api/v1/repo/issue_comment.go
@@ -1,6 +1,7 @@
// Copyright 2015 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
+
package repo
import (
@@ -12,6 +13,7 @@ import (
"code.gitea.io/gitea/modules/context"
)
+// ListIssueComments list all the comments of an issue
func ListIssueComments(ctx *context.APIContext) {
var since time.Time
if len(ctx.Query("since")) > 0 {
@@ -38,6 +40,7 @@ func ListIssueComments(ctx *context.APIContext) {
ctx.JSON(200, &apiComments)
}
+// CreateIssueComment create a comment for an issue
func CreateIssueComment(ctx *context.APIContext, form api.CreateIssueCommentOption) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
@@ -54,6 +57,7 @@ func CreateIssueComment(ctx *context.APIContext, form api.CreateIssueCommentOpti
ctx.JSON(201, comment.APIFormat())
}
+// EditIssueComment modify a comment of an issue
func EditIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption) {
comment, err := models.GetCommentByID(ctx.ParamsInt64(":id"))
if err != nil {