mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user