Move delete deploy keys into service layer (#32201)

This commit is contained in:
Lunny Xiao authored and GitHub committed 2024-12-18 04:10:38 +00:00
1 parent e4c4629465
commit f9f62b4c4c
7 files changed
+61 -66

No files matched your search

+1 -1
View File
@@ -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 {