mirror of
https://github.com/whyour/qinglong.git
synced 2025-09-12 05:52:47 +08:00
Fix optional path compatibility checks
This commit is contained in:
parent
53a96462b2
commit
719a32c191
|
@ -85,7 +85,7 @@ export default (app: Router) => {
|
||||||
try {
|
try {
|
||||||
const scriptService = Container.get(ScriptService);
|
const scriptService = Container.get(ScriptService);
|
||||||
const content = await scriptService.getFile(
|
const content = await scriptService.getFile(
|
||||||
req.query.path as string,
|
req.query?.path as string || '',
|
||||||
req.query.file as string,
|
req.query.file as string,
|
||||||
);
|
);
|
||||||
res.send({ code: 200, data: content });
|
res.send({ code: 200, data: content });
|
||||||
|
|
Loading…
Reference in New Issue
Block a user