summaryrefslogtreecommitdiffstats
path: root/routers/private/key.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/private/key.go')
-rw-r--r--routers/private/key.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/private/key.go b/routers/private/key.go
index 3366b764e6..9977492c63 100644
--- a/routers/private/key.go
+++ b/routers/private/key.go
@@ -25,7 +25,7 @@ func UpdatePublicKeyInRepo(ctx *context.PrivateContext) {
return
}
- deployKey, err := asymkey_model.GetDeployKeyByRepo(keyID, repoID)
+ deployKey, err := asymkey_model.GetDeployKeyByRepo(ctx, keyID, repoID)
if err != nil {
if asymkey_model.IsErrDeployKeyNotExist(err) {
ctx.PlainText(http.StatusOK, "success")
@@ -52,7 +52,7 @@ func UpdatePublicKeyInRepo(ctx *context.PrivateContext) {
func AuthorizedPublicKeyByContent(ctx *context.PrivateContext) {
content := ctx.FormString("content")
- publicKey, err := asymkey_model.SearchPublicKeyByContent(content)
+ publicKey, err := asymkey_model.SearchPublicKeyByContent(ctx, content)
if err != nil {
ctx.JSON(http.StatusInternalServerError, private.Response{
Err: err.Error(),