Last active
May 31, 2016 08:57
-
-
Save pofider/9d1e82a91a45a4e8160794c13d67881f to your computer and use it in GitHub Desktop.
jsreport extension adding request query string into intput data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
'name': 'query-string', | |
'main': 'queryString.js' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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