任务视图增加系统视图

This commit is contained in:
whyour
2022-11-26 20:34:07 +08:00
parent 799cda1e3e
commit 1446e925ec
7 changed files with 58 additions and 16 deletions
+6 -2
View File
@@ -58,8 +58,12 @@ export default (app: Router) => {
async (req: Request, res: Response, next: NextFunction) => {
try {
const cronViewService = Container.get(CronViewService);
const data = await cronViewService.update(req.body);
return res.send({ code: 200, data });
if (req.body.type === 1) {
return res.send({ code: 400, message: '参数错误' });
} else {
const data = await cronViewService.update(req.body);
return res.send({ code: 200, data });
}
} catch (e) {
return next(e);
}