Browse Source

Merge pull request #21 from vamonte/master

Fix the ability to use a function for the  option.
develop
Dustin Diaz 9 years ago
parent
commit
521e3c27c2
  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