1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add support for deleting CodeComments

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz
2018-05-14 14:15:06 +02:00
parent de7081c2ab
commit 7c4bf56649

View File

@@ -1119,7 +1119,7 @@ func DeleteComment(ctx *context.Context) {
if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.IsAdmin()) {
ctx.Error(403)
return
} else if comment.Type != models.CommentTypeComment {
} else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode {
ctx.Error(204)
return
}