diff options
| author | Hafeez | 2018-04-13 16:58:50 +0100 |
|---|---|---|
| committer | Hafeez | 2018-04-13 16:58:50 +0100 |
| commit | 8555711c7f408e74ea8ad3da1875ddbdef36c509 (patch) | |
| tree | ff2f0a8da156be30c7b66c37cb1dd84a9eba99c3 /src/FileRouter.ts | |
| parent | Merge branch 'trh/gets' of gitlab.cs.st-andrews.ac.uk:cs3099group-be-4/projec... (diff) | |
| download | medicine-8555711c7f408e74ea8ad3da1875ddbdef36c509.tar.gz medicine-8555711c7f408e74ea8ad3da1875ddbdef36c509.zip | |
prevent 404 on params
Diffstat (limited to 'src/FileRouter.ts')
| -rw-r--r-- | src/FileRouter.ts | 7 |
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(); } ); |
