Skip to content

Commit

Permalink
fix POST /{username}/{reponame}/{type:issues|pulls}/move_pin
Browse files Browse the repository at this point in the history
(cherry picked from commit 7eda733ed6a22c08a85fdc90deec0c440427cef7)
(cherry picked from commit 2f9ba33d6dbece0836de7ddabc335a61e52c268c)
  • Loading branch information
Loïc Dachary authored and earl-warren committed Nov 25, 2023
1 parent ba4c12d commit e56ce32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routers/web/repo/issue_pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func IssuePinMove(ctx *context.Context) {
log.Error(err.Error())
return
}
if issue.RepoID != ctx.Repo.Repository.ID {
ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{})
return
}

err = issue.MovePin(ctx, form.Position)
if err != nil {
Expand Down

0 comments on commit e56ce32

Please sign in to comment.