diff --git a/back/api/script.ts b/back/api/script.ts index ea682c63..5e05e95d 100644 --- a/back/api/script.ts +++ b/back/api/script.ts @@ -85,7 +85,7 @@ export default (app: Router) => { try { const scriptService = Container.get(ScriptService); const content = await scriptService.getFile( - req.query.path as string, + req.query?.path as string || '', req.query.file as string, ); res.send({ code: 200, data: content });