修复初始化 SystemConfig 数据

This commit is contained in:
whyour committed 2025-01-01 21:33:43 +08:00
1 parent 43d6ac2071
commit cecc5aeb15
3 files changed
+14 -7

No files matched your search

+9 -3
View File
@@ -26,9 +26,15 @@ export default async () => {
const openService = Container.get(OpenService);
// 初始化增加系统配置
await SystemModel.upsert({ type: AuthDataType.systemConfig });
await SystemModel.upsert({ type: AuthDataType.notification });
await SystemModel.upsert({ type: AuthDataType.authConfig });
await SystemModel.findOrCreate({
where: { type: AuthDataType.systemConfig },
});
await SystemModel.findOrCreate({
where: { type: AuthDataType.notification },
});
await SystemModel.findOrCreate({
where: { type: AuthDataType.authConfig },
});
const authConfig = await SystemModel.findOne({
where: { type: AuthDataType.authConfig },
});