Default not needed

This commit is contained in:
Daniel García Aubert 2019-07-29 16:27:19 +02:00
parent 41c7244714
commit cba3b74593

View File

@ -7,7 +7,7 @@ module.exports = function params ({ strategy = 'query' } = {}) {
const getParams = getParamsFromStrategy(strategy);
return function paramsMiddleware (req, res, next) {
const input = Object.assign({}, req.query, req.body || {});
const input = Object.assign({}, req.query, req.body);
try {
res.locals.params = getParams(input);