fix GET /repos/{owner}/{repo}/issues/comments/{id}/reactions

(cherry picked from commit a146e3d0f9ff8ac1aee4be8a3632c76b35fc3482)
This commit is contained in:
Loïc Dachary 2023-11-02 15:19:12 +01:00
parent 2af5a75d71
commit 585f74c2ca
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -61,6 +61,12 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
if err := comment.LoadIssue(ctx); err != nil { if err := comment.LoadIssue(ctx); err != nil {
ctx.Error(http.StatusInternalServerError, "comment.LoadIssue", err) ctx.Error(http.StatusInternalServerError, "comment.LoadIssue", err)
return
}
if comment.Issue.RepoID != ctx.Repo.Repository.ID {
ctx.NotFound()
return
} }
if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) { if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) {