dev: comments
Massimo Melina committed
Mar 12, 2023 at 13:27 UTC
fffb25c9625c128db308fee220340db373cf4ab8
1 file changed
+3
-1
src/api.file_list.ts
+3
-1
@@ -18,7 +18,9 @@ export const file_list: ApiHandler = async ({ path, offset, limit, search, omit,
18
if (dirTraversal(search))
19
return fail(HTTP_FOOL)
20
if (node.default)
21
- return (sse ? list.custom : _.identity)({ redirect: path }) // sse will wrap the object in a 'custom' message, otherwise we plainly return the object
21
+ return (sse ? list.custom : _.identity)({ // sse will wrap the object in a 'custom' message, otherwise we plainly return the object
22
+ redirect: path // tell the browser to access the folder (instead of using this api), so it will get the default file
23
+ })
24
if (!await nodeIsDirectory(node))
25
return fail(HTTP_METHOD_NOT_ALLOWED)
26
offset = Number(offset)