aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index a3cc9660..3b1d9305 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -906,6 +906,7 @@ func UpdateCommentContent(ctx *context.Context) {
return
}
+ oldContent := comment.Content
comment.Content = ctx.Query("content")
if len(comment.Content) == 0 {
ctx.JSON(200, map[string]interface{}{
@@ -913,7 +914,7 @@ func UpdateCommentContent(ctx *context.Context) {
})
return
}
- if err = models.UpdateComment(comment); err != nil {
+ if err = models.UpdateComment(ctx.User, comment, oldContent); err != nil {
ctx.Handle(500, "UpdateComment", err)
return
}
@@ -938,7 +939,7 @@ func DeleteComment(ctx *context.Context) {
return
}
- if err = models.DeleteCommentByID(comment.ID); err != nil {
+ if err = models.DeleteCommentByID(ctx.User, comment.ID); err != nil {
ctx.Handle(500, "DeleteCommentByID", err)
return
}