aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHafeez2018-04-13 16:58:50 +0100
committerHafeez2018-04-13 16:58:50 +0100
commit8555711c7f408e74ea8ad3da1875ddbdef36c509 (patch)
treeff2f0a8da156be30c7b66c37cb1dd84a9eba99c3 /src
parentMerge branch 'trh/gets' of gitlab.cs.st-andrews.ac.uk:cs3099group-be-4/projec... (diff)
downloadmedicine-8555711c7f408e74ea8ad3da1875ddbdef36c509.tar.gz
medicine-8555711c7f408e74ea8ad3da1875ddbdef36c509.zip

prevent 404 on params

Diffstat (limited to 'src')
-rw-r--r--src/FileRouter.ts7
1 files changed, 2 insertions, 5 deletions
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();
}
);