Skip to content

Instantly share code, notes, and snippets.

@pofider
Last active May 31, 2016 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pofider/9d1e82a91a45a4e8160794c13d67881f to your computer and use it in GitHub Desktop.
Save pofider/9d1e82a91a45a4e8160794c13d67881f to your computer and use it in GitHub Desktop.
jsreport extension adding request query string into intput data
module.exports = {
'name': 'query-string',
'main': 'queryString.js'
}
module.exports = function (reporter, definition) {
reporter.beforeRenderListeners.add('queryString', function (req) {
req.data = req.data || {}
req.data.$query = req.query
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment