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 cbc595b

Browse files
GiteaBotlunny
andauthored
Allow deleting comment with content via API like web did (#35346) (#35354)
Backport #35346 by @lunny Fix #35296 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent cc5ccf4 commit cbc595b

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 によって変換されたページ (->オリジナル) /