fix tests

This commit is contained in:
2018-08-25 13:14:02 +03:00
parent cfe366c469
commit 68d9d979b1
10 changed files with 945 additions and 1343 deletions

4
app.js
View File

@@ -74,8 +74,8 @@ app.use((req, res) => {
// handle errors
app.use((error, req, res, next) => {
if (error.code) {
res.status(error.code);
if (error.status) {
res.status(error.status);
} else {
switch (error.name) {
case 'ValidationError':