From ba352ef4b1340a17c0199eb5da5943d82bbf1df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sun, 26 Nov 2023 06:33:46 +0100 Subject: [PATCH] Revert "fix {DELETE,POST} /repos/{owner}/{repo}/issues/comments/{id}/reactions" This reverts commit 685ebdba634e508917c0f83ddb54dd090f10c739. --- routers/api/v1/repo/issue_reaction.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/routers/api/v1/repo/issue_reaction.go b/routers/api/v1/repo/issue_reaction.go index b87d636b80..12be5c388f 100644 --- a/routers/api/v1/repo/issue_reaction.go +++ b/routers/api/v1/repo/issue_reaction.go @@ -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) {