修复openapi认证,环境变量排序

This commit is contained in:
whyour committed 2022-01-13 11:13:04 +08:00
1 parent e13ff86ff6
commit 43bc29b25c
4 files changed
+21 -8

No files matched your search

+6
View File
@@ -31,6 +31,12 @@ export default class CronService {
}
public async insert(payload: Crontab): Promise<Crontab> {
const cron = await CrontabModel.findOne({
where: { command: payload.command },
});
if (cron) {
return cron;
}
return await CrontabModel.create(payload, { returning: true });
}