Refactored a bit the code; the original code was too experimental in style.

This commit is contained in:
didier amyot committed 2023-06-13 08:00:01 -04:00
1 parent f7a8d494f5
commit bbd705ee3b
3 files changed
+55 -60

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ function getFileHandlerFactory(fileService: FileService): Handler {
return async (ctx: Context) => {
const untypedCtx: any = ctx;
const fileId = untypedCtx.params.path;
const reader = await fileService.getBodyAsReader(fileId);
const reader = await fileService.getContentAsReader(fileId);
if(reader == null){
ctx.response.status = 404;
return;