param-parse.js
325 Bytes
'use strict';
const _ = require('lodash');
const parameter = require(`${global.utils}/parameter`);
module.exports = (req, res, next) => {
let param = req.params.pathQs;
param = _.trimEnd(param, '.html');
if (param) {
Object.assign(req.query, parameter.minPathToFullParam(param));
}
next();
};