diff options
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index b9083e20e9..1be0b408a6 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -26,6 +26,7 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + comment_service "code.gitea.io/gitea/services/comments" milestone_service "code.gitea.io/gitea/services/milestone" "github.com/unknwon/com" @@ -1299,7 +1300,7 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) { return } - comment, err := models.CreateIssueComment(ctx.User, ctx.Repo.Repository, issue, form.Content, attachments) + comment, err := comment_service.CreateIssueComment(ctx.User, ctx.Repo.Repository, issue, form.Content, attachments) if err != nil { ctx.ServerError("CreateIssueComment", err) return @@ -1339,7 +1340,7 @@ func UpdateCommentContent(ctx *context.Context) { }) return } - if err = models.UpdateComment(ctx.User, comment, oldContent); err != nil { + if err = comment_service.UpdateComment(comment, ctx.User, oldContent); err != nil { ctx.ServerError("UpdateComment", err) return } @@ -1372,7 +1373,7 @@ func DeleteComment(ctx *context.Context) { return } - if err = models.DeleteComment(ctx.User, comment); err != nil { + if err = models.DeleteComment(comment, ctx.User); err != nil { ctx.ServerError("DeleteCommentByID", err) return } |