summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-05-16 22:01:55 +0800
committerGitHub <noreply@github.com>2018-05-16 22:01:55 +0800
commit24941a10464dc27eaebafda2a208fa827b74ff8d (patch)
treec875dd6b7d659e2dbd926dbd3a04a036f9f41c94 /routers/api/v1/repo
parent188fe6c301f9c44d569b75cb339d6a6b3f6e03ad (diff)
downloadgitea-24941a10464dc27eaebafda2a208fa827b74ff8d.tar.gz
gitea-24941a10464dc27eaebafda2a208fa827b74ff8d.zip
Add more webhooks support and refactor webhook templates directory (#3929)
* add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * load attributes when created release * update comparsion doc
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r--routers/api/v1/repo/issue_comment.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go
index a9258849ea..2865ea9165 100644
--- a/routers/api/v1/repo/issue_comment.go
+++ b/routers/api/v1/repo/issue_comment.go
@@ -261,8 +261,9 @@ func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption)
return
}
+ oldContent := comment.Content
comment.Content = form.Body
- if err := models.UpdateComment(comment); err != nil {
+ if err := models.UpdateComment(ctx.User, comment, oldContent); err != nil {
ctx.Error(500, "UpdateComment", err)
return
}
@@ -348,7 +349,7 @@ func deleteIssueComment(ctx *context.APIContext) {
return
}
- if err = models.DeleteComment(comment); err != nil {
+ if err = models.DeleteComment(ctx.User, comment); err != nil {
ctx.Error(500, "DeleteCommentByID", err)
return
}