mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 04:05:42 +01:00
comment: save empty comments
This commit is contained in:
parent
0d37f3a79b
commit
ea9051624d
1 changed files with 0 additions and 6 deletions
|
@ -3160,12 +3160,6 @@ func UpdateCommentContent(ctx *context.Context) {
|
||||||
|
|
||||||
oldContent := comment.Content
|
oldContent := comment.Content
|
||||||
comment.Content = ctx.FormString("content")
|
comment.Content = ctx.FormString("content")
|
||||||
if len(comment.Content) == 0 {
|
|
||||||
ctx.JSON(http.StatusOK, map[string]any{
|
|
||||||
"content": "",
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if err = issue_service.UpdateComment(ctx, comment, ctx.Doer, oldContent); err != nil {
|
if err = issue_service.UpdateComment(ctx, comment, ctx.Doer, oldContent); err != nil {
|
||||||
ctx.ServerError("UpdateComment", err)
|
ctx.ServerError("UpdateComment", err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue