mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
Backport #28406 by @lunny
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit cd2dd5a67d
)
This commit is contained in:
parent
69b4fd5fe2
commit
e4dc14f070
2 changed files with 24 additions and 4 deletions
|
@ -90,6 +90,12 @@ func IssuePinMove(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if issue.RepoID != ctx.Repo.Repository.ID {
|
||||
ctx.Status(http.StatusNotFound)
|
||||
log.Error("Issue does not belong to this repository")
|
||||
return
|
||||
}
|
||||
|
||||
err = issue.MovePin(ctx, form.Position)
|
||||
if err != nil {
|
||||
ctx.Status(http.StatusInternalServerError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue