alapa
Version:
A cutting-edge web development framework designed to revolutionize the way developers build modern web applications.
13 lines (12 loc) • 425 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.changeMethod = void 0;
const changeMethod = (req, res, next) => {
res.locals.method = (methodName) => `<input type="hidden" name="_method" value="${methodName}" />`;
const method = req.body["_method"];
if (method) {
req.method = method.toString().toUpperCase();
}
next();
};
exports.changeMethod = changeMethod;
;