Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-30 22:06:11 +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:
Loïc Dachary 2023-11-12 22:45:59 +01:00
parent d095e4fdc5
commit 5322136af8
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -155,6 +155,11 @@ func GetDeployKey(ctx *context.APIContext) {
return
}
if key.RepoID != ctx.Repo.Repository.ID {
ctx.Status(http.StatusNotFound)
return
}
if err = key.GetContent(); err != nil {
ctx.Error(http.StatusInternalServerError, "GetContent", err)
return