Skip to content

Commit

Permalink
fix(middleware): next could not be called in middleware allRequest()
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Krummsdorf committed Feb 26, 2015
1 parent cc4214e commit f175662
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions server/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ module.exports = function (options) {
});

if (!found) {
var err = new options.errors.AuthError();
next(err);
next(new options.errors.AuthError());
} else {
next();
}

next();
};

self.auth = function (req, res, next) {
Expand Down

0 comments on commit f175662

Please sign in to comment.