修复脚本管理查询逻辑

This commit is contained in:
whyour
2025-04-25 01:40:37 +08:00
parent 1befa1bb8c
commit 40a831f3a2
2 changed files with 49 additions and 21 deletions
+3 -3
View File
@@ -37,11 +37,11 @@ export default (app: Router) => {
'package-lock.json',
];
if (req.query.path) {
const targetPath = path.join(
config.scriptPath,
result = await readDir(
req.query.path as string,
config.scriptPath,
blacklist,
);
result = await readDir(targetPath, config.scriptPath, blacklist);
} else {
result = await readDirs(
config.scriptPath,