port middlewares to authenticate users with headers and sessions

This commit is contained in:
Matteo Pagliazzi
2015-11-07 15:37:38 +01:00
parent 0cf964728e
commit ac7d3e642f
3 changed files with 67 additions and 1 deletions

View File

@@ -21,7 +21,6 @@ export default function errorHandler (err, req, res, next) {
// In case of a CustomError class, use it's data
// Otherwise try to identify the type of error (mongoose validation, mongodb unique, ...)
// If we can't identify it, respond with a generic 500 error
let responseErr = err instanceof CustomError ? err : null;
if (!responseErr) {