mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-11 04:11:18 +01:00
fix GET /api/v1/repos/{owner}/{repo}/keys/{id}
(cherry picked from commit 768238d9f9982e99ad4cbf3942d2d2db5126a150) Conflicts: routers/api/v1/repo/key.go trivial context conflict
This commit is contained in:
parent
b7f399714f
commit
4674130df2
1 changed files with 5 additions and 0 deletions
|
@ -159,6 +159,11 @@ func GetDeployKey(ctx *context.APIContext) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if key.RepoID != ctx.Repo.Repository.ID {
|
||||||
|
ctx.Status(http.StatusNotFound)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if err = key.GetContent(); err != nil {
|
if err = key.GetContent(); err != nil {
|
||||||
ctx.Error(http.StatusInternalServerError, "GetContent", err)
|
ctx.Error(http.StatusInternalServerError, "GetContent", err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue