mirror of
https://github.com/certd/certd.git
synced 2026-05-16 13:17:29 +08:00
fix: 修复启动时报密钥备份不存在的问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { logger } from '@certd/basic';
|
||||
import { PlusService, SysInstallInfo, SysPrivateSettings, SysSettingsService } from '@certd/lib-server';
|
||||
import { EncryptService, PlusService, SysInstallInfo, SysPrivateSettings, SysSettingsService } from '@certd/lib-server';
|
||||
import { Config, Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import crypto from 'crypto';
|
||||
import { nanoid } from 'nanoid';
|
||||
@@ -22,6 +22,10 @@ export class AutoInitSite {
|
||||
@Inject()
|
||||
safeService: SafeService;
|
||||
|
||||
@Inject()
|
||||
encryptService: EncryptService;
|
||||
|
||||
|
||||
async init() {
|
||||
logger.info('初始化站点开始');
|
||||
await this.startOptimizeDb();
|
||||
@@ -50,6 +54,8 @@ export class AutoInitSite {
|
||||
//加载一次密钥
|
||||
await this.sysSettingsService.getSecret();
|
||||
|
||||
//初始化加密服务
|
||||
await this.encryptService.doInit();
|
||||
|
||||
// 授权许可
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user