Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dotcook/lambda-api

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcook/lambda-api - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "@dotcook/lambda-api",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [

@@ -0,1 +1,2 @@

/* eslint-disable no-param-reassign */
const middy = require('middy');

@@ -8,11 +9,8 @@ const { jsonBodyParser, httpErrorHandler } = require('middy/middlewares');

after(handler, next) {
const { response } = handler;
// eslint-disable-next-line no-param-reassign
handler.response = {
statusCode: 200,
body: JSON.stringify({
...response,
success: true,
}),
};
const { statusCode, ...response } = handler;
handler.response.statusCode = statusCode || 200;
handler.response.body = JSON.stringify({
...response,
success: true,
});
next();

@@ -25,10 +23,7 @@ },

console.error(handler.error);
// eslint-disable-next-line no-param-reassign
handler.response = {
statusCode: status,
body: JSON.stringify({
success: false,
message,
}),
};
handler.response.statusCode = status;
handler.response.body = JSON.stringify({
success: false,
message,
});
},

@@ -35,0 +30,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc