This commit is contained in:
Lunny Xiao 2025-07-16 17:19:21 -07:00
parent 5cc338897c
commit 2d423dc78c

View File

@ -721,7 +721,7 @@ func deleteIssueComment(ctx *context.APIContext) {
if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
ctx.Status(http.StatusForbidden)
return
} else if comment.Type != issues_model.CommentTypeComment && comment.Type == issues_model.CommentTypeCode {
} else if comment.Type != issues_model.CommentTypeComment && comment.Type != issues_model.CommentTypeCode {
ctx.Status(http.StatusNoContent)
return
}