aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-12-17 20:10:38 -0800
committerGitHub <noreply@github.com>2024-12-18 04:10:38 +0000
commitf9f62b4c4cb356c7a06b4ce6b0be2e672aa47725 (patch)
treec6b256c75fbc8e63e2ba7741907466a19fc787d6 /routers/api/v1
parente4c4629465f4e45ffdb9ef5eff6ef17e15ee4c2d (diff)
downloadgitea-f9f62b4c4cb356c7a06b4ce6b0be2e672aa47725.tar.gz
gitea-f9f62b4c4cb356c7a06b4ce6b0be2e672aa47725.zip
Move delete deploy keys into service layer (#32201)
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/repo/key.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go
index e5115980eb..060694d085 100644
--- a/routers/api/v1/repo/key.go
+++ b/routers/api/v1/repo/key.go
@@ -279,7 +279,7 @@ func DeleteDeploykey(ctx *context.APIContext) {
// "404":
// "$ref": "#/responses/notFound"
- if err := asymkey_service.DeleteDeployKey(ctx, ctx.Doer, ctx.PathParamInt64(":id")); err != nil {
+ if err := asymkey_service.DeleteDeployKey(ctx, ctx.Repo.Repository, ctx.PathParamInt64(":id")); err != nil {
if asymkey_model.IsErrKeyAccessDenied(err) {
ctx.Error(http.StatusForbidden, "", "You do not have access to this key")
} else {