修改任务状态更新失败提示,重复运行提示

This commit is contained in:
whyour
2025-01-12 00:19:14 +08:00
parent e5b35273f9
commit 51ef4e7476
11 changed files with 115 additions and 88 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { Router, Request, Response, NextFunction } from 'express';
import { Container } from 'typedi';
import { Logger } from 'winston';
import config from '../config';
import { getFileContentByName, readDirs, rmPath } from '../config/util';
import { getFileContentByName, readDirs, removeAnsi, rmPath } from '../config/util';
import { join, resolve } from 'path';
import { celebrate, Joi } from 'celebrate';
const route = Router();
@@ -42,7 +42,7 @@ export default (app: Router) => {
return res.send({ code: 403, message: '暂无权限' });
}
const content = await getFileContentByName(finalPath);
res.send({ code: 200, data: content });
res.send({ code: 200, data: removeAnsi(content) });
} catch (e) {
return next(e);
}