summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc/signing.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-12-10 16:14:24 +0800
committerGitHub <noreply@github.com>2021-12-10 16:14:24 +0800
commit3ca5dc7e32b372d14ff80d96f14b8f6a805862f1 (patch)
tree50d193ed0dacf2888d57b193a9b0d36065aff205 /routers/api/v1/misc/signing.go
parent0a9fcf63a49799ad3b0f146c54879161bac61e10 (diff)
downloadgitea-3ca5dc7e32b372d14ff80d96f14b8f6a805862f1.tar.gz
gitea-3ca5dc7e32b372d14ff80d96f14b8f6a805862f1.zip
Move keys to models/asymkey (#17917)
* Move keys to models/keys * Rename models/keys -> models/asymkey * change the missed package name * Fix package alias * Fix test * Fix docs * Fix test * Fix test * merge
Diffstat (limited to 'routers/api/v1/misc/signing.go')
-rw-r--r--routers/api/v1/misc/signing.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/misc/signing.go b/routers/api/v1/misc/signing.go
index 3c3391bfe7..e2833173a3 100644
--- a/routers/api/v1/misc/signing.go
+++ b/routers/api/v1/misc/signing.go
@@ -8,8 +8,8 @@ import (
"fmt"
"net/http"
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ asymkey_service "code.gitea.io/gitea/services/asymkey"
)
// SigningKey returns the public key of the default signing key if it exists
@@ -52,7 +52,7 @@ func SigningKey(ctx *context.APIContext) {
path = ctx.Repo.Repository.RepoPath()
}
- content, err := models.PublicSigningKey(path)
+ content, err := asymkey_service.PublicSigningKey(path)
if err != nil {
ctx.Error(http.StatusInternalServerError, "gpg export", err)
return