Simplify folder structure

This commit is contained in:
Daniel García Aubert
2019-10-07 09:40:50 +02:00
parent 0d638e6bad
commit 281a079a62
221 changed files with 175 additions and 175 deletions
+12
View File
@@ -0,0 +1,12 @@
'use strict';
module.exports = function syntaxError () {
return function syntaxErrorMiddleware (err, req, res, next) {
if (err.name === 'SyntaxError') {
err.http_status = 400;
err.message = `${err.name}: ${err.message}`;
}
next(err);
};
};