修改脚本详情和日志详情接口

This commit is contained in:
whyour
2024-01-29 21:47:03 +08:00
parent 49c441117a
commit 0ae1f284ec
6 changed files with 25 additions and 21 deletions
+2 -2
View File
@@ -73,14 +73,14 @@ export default (app: Router) => {
});
route.get(
'/:file',
'/detail',
async (req: Request, res: Response, next: NextFunction) => {
const logger: Logger = Container.get('logger');
try {
const filePath = join(
config.scriptPath,
req.query.path as string,
req.params.file,
req.query.file as string,
);
const content = await getFileContentByName(filePath);
res.send({ code: 200, data: content });