From 8555711c7f408e74ea8ad3da1875ddbdef36c509 Mon Sep 17 00:00:00 2001 From: Hafeez Date: Fri, 13 Apr 2018 16:58:50 +0100 Subject: prevent 404 on params --- src/FileRouter.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/FileRouter.ts') diff --git a/src/FileRouter.ts b/src/FileRouter.ts index e890241..f4d2fdc 100644 --- a/src/FileRouter.ts +++ b/src/FileRouter.ts @@ -716,11 +716,8 @@ export class FileRouter { uuid: fileId } }); - if (file == null) { - return next(new RequestError(404, 'file_not_found')); - } else { - res.locals.file = file; - } + + res.locals.file = file; next(); } ); -- cgit v1.2.1