Comparing version 0.27.0 to 0.27.1
{ | ||
"name": "middy", | ||
"version": "0.27.0", | ||
"version": "0.27.1", | ||
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -69,3 +69,3 @@ <div align="center"> | ||
const middy = require('middy') | ||
const { urlEncodeBodyParser, validator, httpErrorHandler } = require('middy/middlewares') | ||
const { jsonBodyParser, validator, httpErrorHandler } = require('middy/middlewares') | ||
@@ -107,3 +107,3 @@ // This is your common handler, in no way different than what you are used to doing every day | ||
const handler = middy(processPayment) | ||
.use(urlEncodeBodyParser()) // parses the request body when it's a JSON and converts it to an object | ||
.use(jsonBodyParser()) // parses the request body when it's a JSON and converts it to an object | ||
.use(validator({inputSchema})) // validates the input | ||
@@ -110,0 +110,0 @@ .use(httpErrorHandler()) // handles common http errors and returns proper responses |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
182335