aboutsummaryrefslogtreecommitdiff
path: root/src/app.ts
diff options
context:
space:
mode:
authorTom Harley2018-03-27 19:19:16 +0100
committerTom Harley2018-03-27 19:19:16 +0100
commit150115e855e2c406b23aa569dd675597d6957570 (patch)
tree7cb6cbbc7e7f2911596bb1f03dbcedd8b10e0e49 /src/app.ts
parentMerge branch 'cjd24/conversion' into development (diff)
parentCentralise test configuration and introduce SQLite (diff)
downloadmedicine-150115e855e2c406b23aa569dd675597d6957570.tar.gz
medicine-150115e855e2c406b23aa569dd675597d6957570.zip

Merge branch ‘testing-middleware’ into development

Diffstat (limited to 'src/app.ts')
-rw-r--r--src/app.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/app.ts b/src/app.ts
index 025164b..03f2cdb 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -128,8 +128,7 @@ class App {
}
});
if (user === null) {
- next(new RequestError(404, 'user_not_found'));
- return;
+ return next(new RequestError(404, 'user_not_found'));
} else {
res.locals.user = user;
}
@@ -176,8 +175,7 @@ class App {
}
});
if (fileOrNull === null) {
- next();
- return;
+ return next();
} else {
file = fileOrNull;
}
@@ -193,8 +191,7 @@ class App {
}
});
if (parentFolder === null) {
- next();
- return;
+ return next();
}
res.locals.parentFolder = parentFolder;
const tFile: File | undefined = parentFolder.containedFiles.find(