mirror of
https://github.com/whyour/qinglong.git
synced 2025-09-12 05:52:47 +08:00
优化脚本 API 路由的错误处理逻辑
This commit is contained in:
parent
37a2b1267d
commit
53a96462b2
|
@ -109,8 +109,8 @@ export default (app: Router) => {
|
|||
try {
|
||||
const scriptService = Container.get(ScriptService);
|
||||
const content = await scriptService.getFile(
|
||||
req.query.path as string,
|
||||
req.params?.file || '',
|
||||
req.query?.path as string || '',
|
||||
req.params.file,
|
||||
);
|
||||
res.send({ code: 200, data: content });
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user