Browse Source

Fix the ability to use a function for the option.

The lookup function worked only for the first time.
develop
vamonte 10 years ago
parent
commit
6cff5dd78e
  1. 3
      index.js

3
index.js

@ -49,8 +49,9 @@ module.exports = function (app, db) {
})
}
if (typeof(opts.lookup) === 'function') {
var callableLookup = opts.lookup;
middleware = function (middleware, req, res, next) {
return opts.lookup(req, res, opts, function () {
return callableLookup(req, res, opts, function () {
return middleware(req, res, next)
})
}.bind(this, middleware)

Loading…
Cancel
Save