1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 20:17:21 +00:00

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
This commit is contained in:
Lunny Xiao
2021-12-10 16:14:24 +08:00
committed by GitHub
parent 0a9fcf63a4
commit 3ca5dc7e32
75 changed files with 1001 additions and 887 deletions

View File

@ -9,6 +9,7 @@ import (
"time"
"code.gitea.io/gitea/models"
asymkey_model "code.gitea.io/gitea/models/asymkey"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/updatechecker"
@ -67,7 +68,7 @@ func registerRewriteAllPublicKeys() {
RunAtStart: false,
Schedule: "@every 72h",
}, func(_ context.Context, _ *user_model.User, _ Config) error {
return models.RewriteAllPublicKeys()
return asymkey_model.RewriteAllPublicKeys()
})
}
@ -77,7 +78,7 @@ func registerRewriteAllPrincipalKeys() {
RunAtStart: false,
Schedule: "@every 72h",
}, func(_ context.Context, _ *user_model.User, _ Config) error {
return models.RewriteAllPrincipalKeys()
return asymkey_model.RewriteAllPrincipalKeys()
})
}