Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c4fbccc

Browse files
authored
Allow deleting comment with content via API like web did (#35346)
Fix #35296
1 parent c7b99c8 commit c4fbccc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎routers/api/v1/repo/issue_comment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,8 +721,8 @@ func deleteIssueComment(ctx *context.APIContext) {
721721
if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
722722
ctx.Status(http.StatusForbidden)
723723
return
724-
} else if comment.Type!=issues_model.CommentTypeComment {
725-
ctx.Status(http.StatusNoContent)
724+
} else if !comment.Type.HasContentSupport() {
725+
ctx.Status(http.StatusBadRequest)
726726
return
727727
}
728728

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /