Revert "fix {DELETE,POST} /repos/{owner}/{repo}/issues/comments/{id}/reactions"

This reverts commit 685ebdba63.
This commit is contained in:
Loïc Dachary 2023-11-26 06:33:46 +01:00
parent d8204f3e8f
commit ba352ef4b1
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -186,19 +186,9 @@ func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp
return
}
if err = comment.LoadIssue(ctx); err != nil {
err = comment.LoadIssue(ctx)
if err != nil {
ctx.Error(http.StatusInternalServerError, "comment.LoadIssue() failed", err)
return
}
if comment.Issue.RepoID != ctx.Repo.Repository.ID {
ctx.NotFound()
return
}
if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) {
ctx.NotFound()
return
}
if comment.Issue.IsLocked && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull) {