removing underscore dependency in locals middleware
This commit is contained in:
parent
c0df0d12c6
commit
667b2a9cb1
@ -1,8 +1,6 @@
|
||||
const _ = require('underscore');
|
||||
|
||||
module.exports = function localsMiddleware(req, res, next) {
|
||||
_.defaults(res.locals, req.params);
|
||||
|
||||
// save req.params in res.locals
|
||||
res.locals = Object.assign(req.params || {}, res.locals);
|
||||
|
||||
next();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user