修改删除日志逻辑

This commit is contained in:
whyour
2023-02-27 23:25:08 +08:00
parent 6c34045a48
commit c285026339
5 changed files with 57 additions and 4 deletions
+15
View File
@@ -152,6 +152,21 @@ export default (app: Router) => {
}
});
route.get(
'/detail',
async (req: Request, res: Response, next: NextFunction) => {
const logger: Logger = Container.get('logger');
try {
const cronService = Container.get(CronService);
const data = await cronService.find(req.query as any);
return res.send({ code: 200, data });
} catch (e) {
logger.error('🔥 error: %o', e);
return next(e);
}
},
);
route.post(
'/',
celebrate({