Move some asymkey functions to service layer (#28894)
After the moving, all models will not depend on `util.Rename` so that I can do next step refactoring.
This commit is contained in:
parent
c337ff0ec7
commit
e2277d07ca
16 changed files with 176 additions and 140 deletions
|
@ -4,8 +4,8 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
asymkey_model "code.gitea.io/gitea/models/asymkey"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
asymkey_service "code.gitea.io/gitea/services/asymkey"
|
||||
repo_service "code.gitea.io/gitea/services/repository"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
|
@ -42,5 +42,5 @@ func runRegenerateKeys(_ *cli.Context) error {
|
|||
if err := initDB(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
return asymkey_model.RewriteAllPublicKeys(ctx)
|
||||
return asymkey_service.RewriteAllPublicKeys(ctx)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue