1
0
Fork 0
forked from forgejo/forgejo

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
This commit is contained in:
Lunny Xiao 2018-05-16 22:01:55 +08:00 committed by GitHub
parent 188fe6c301
commit 24941a1046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 1010 additions and 118 deletions

View file

@ -1086,6 +1086,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{}{
@ -1093,7 +1094,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.ServerError("UpdateComment", err)
return
}
@ -1119,7 +1120,7 @@ func DeleteComment(ctx *context.Context) {
return
}
if err = models.DeleteComment(comment); err != nil {
if err = models.DeleteComment(ctx.User, comment); err != nil {
ctx.ServerError("DeleteCommentByID", err)
return
}