修复系统设置数据未初始化

This commit is contained in:
whyour
2024-06-12 13:53:45 +08:00
parent 372afb92c6
commit 46e71d8213
9 changed files with 30 additions and 34 deletions
+1 -1
View File
@@ -376,7 +376,7 @@ export default class CronService {
public async getDb(query: FindOptions<Crontab>['where']): Promise<Crontab> {
const doc: any = await CrontabModel.findOne({ where: { ...query } });
if (!doc) {
throw new Error(`${JSON.stringify(query)} not found`);
throw new Error(`Cron ${JSON.stringify(query)} not found`);
}
return doc.get({ plain: true });
}