diff --git a/templates/express-server/src/api/routes/___.js b/templates/express-server/src/api/routes/___.js index 2aa807f..7744281 100644 --- a/templates/express-server/src/api/routes/___.js +++ b/templates/express-server/src/api/routes/___.js @@ -24,7 +24,7 @@ router.{{@key}}('{{../../subresource}}', async (req, res, next) => { {{{quote ../name}}}: req.params['{{../name}}']{{#unless @last}},{{/unless}} {{/equal}} {{#equal this.in "header"}} - {{{quote ../name}}}: req.header['{{../name}}']{{#unless @last}},{{/unless}} +{{{quote ../name}}}: req.get('{{../name}}'){{#unless @last}},{{/unless}} {{/equal}} {{#match @../key "(post|put)"}} {{#equal ../in "body"}}