aws-lambda-fastify
Advanced tools
Comparing version 2.0.0 to 2.0.1
11
index.js
@@ -9,7 +9,8 @@ module.exports = (app, options) => { | ||
options.decorationPropertyName = options.decorationPropertyName || 'awsLambda' | ||
app.decorateRequest(options.decorationPropertyName) | ||
app.addHook('onRequest', async (req) => { | ||
req[options.decorationPropertyName] = { | ||
event: currentAwsArguments.event, | ||
context: currentAwsArguments.context | ||
app.decorateRequest(options.decorationPropertyName, { | ||
get event () { | ||
return currentAwsArguments.event | ||
}, | ||
get context () { | ||
return currentAwsArguments.context | ||
} | ||
@@ -16,0 +17,0 @@ }) |
@@ -29,3 +29,3 @@ { | ||
"license": "MIT", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"main": "index.js", | ||
@@ -32,0 +32,0 @@ "scripts": { |
192
19300