aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/issue_comment.go')
-rw-r--r--routers/api/v1/repo/issue_comment.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go
index 6065adc27f..22533c3810 100644
--- a/routers/api/v1/repo/issue_comment.go
+++ b/routers/api/v1/repo/issue_comment.go
@@ -79,7 +79,7 @@ func ListIssueComments(ctx *context.APIContext) {
Type: models.CommentTypeComment,
}
- comments, err := models.FindComments(opts)
+ comments, err := models.FindComments(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, "FindComments", err)
return
@@ -172,7 +172,7 @@ func ListIssueCommentsAndTimeline(ctx *context.APIContext) {
Type: models.CommentTypeUnknown,
}
- comments, err := models.FindComments(opts)
+ comments, err := models.FindComments(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, "FindComments", err)
return
@@ -269,7 +269,7 @@ func ListRepoIssueComments(ctx *context.APIContext) {
Before: before,
}
- comments, err := models.FindComments(opts)
+ comments, err := models.FindComments(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, "FindComments", err)
return
@@ -399,7 +399,7 @@ func GetIssueComment(ctx *context.APIContext) {
// "404":
// "$ref": "#/responses/notFound"
- comment, err := models.GetCommentByID(ctx.ParamsInt64(":id"))
+ comment, err := models.GetCommentByID(ctx, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrCommentNotExist(err) {
ctx.NotFound(err)
@@ -526,7 +526,7 @@ func EditIssueCommentDeprecated(ctx *context.APIContext) {
}
func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption) {
- comment, err := models.GetCommentByID(ctx.ParamsInt64(":id"))
+ comment, err := models.GetCommentByID(ctx, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrCommentNotExist(err) {
ctx.NotFound(err)
@@ -629,7 +629,7 @@ func DeleteIssueCommentDeprecated(ctx *context.APIContext) {
}
func deleteIssueComment(ctx *context.APIContext) {
- comment, err := models.GetCommentByID(ctx.ParamsInt64(":id"))
+ comment, err := models.GetCommentByID(ctx, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrCommentNotExist(err) {
ctx.NotFound(err)