summaryrefslogtreecommitdiffstats
path: root/services/wiki/wiki.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 /services/wiki/wiki.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 'services/wiki/wiki.go')
-rw-r--r--services/wiki/wiki.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go
index 18e9b26d81..aa683dd44f 100644
--- a/services/wiki/wiki.go
+++ b/services/wiki/wiki.go
@@ -22,6 +22,7 @@ import (
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/sync"
"code.gitea.io/gitea/modules/util"
+ asymkey_service "code.gitea.io/gitea/services/asymkey"
)
var (
@@ -225,7 +226,7 @@ func updateWikiPage(doer *user_model.User, repo *repo_model.Repository, oldWikiN
committer := doer.NewGitSig()
- sign, signingKey, signer, _ := models.SignWikiCommit(repo, doer)
+ sign, signingKey, signer, _ := asymkey_service.SignWikiCommit(repo.WikiPath(), doer)
if sign {
commitTreeOpts.KeyID = signingKey
if repo.GetTrustModel() == repo_model.CommitterTrustModel || repo.GetTrustModel() == repo_model.CollaboratorCommitterTrustModel {
@@ -343,7 +344,7 @@ func DeleteWikiPage(doer *user_model.User, repo *repo_model.Repository, wikiName
committer := doer.NewGitSig()
- sign, signingKey, signer, _ := models.SignWikiCommit(repo, doer)
+ sign, signingKey, signer, _ := asymkey_service.SignWikiCommit(repo.WikiPath(), doer)
if sign {
commitTreeOpts.KeyID = signingKey
if repo.GetTrustModel() == repo_model.CommitterTrustModel || repo.GetTrustModel() == repo_model.CollaboratorCommitterTrustModel {