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

twilio-webhooks

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twilio-webhooks - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

4

package.json
{
"name": "twilio-webhooks",
"version": "2.0.8",
"version": "2.0.9",
"description": "Process webhooks sent by Twilio",

@@ -38,3 +38,3 @@ "main": "index.js",

},
"gitHead": "b68f0acaa9cbc87bfb077edd3657c093c37c337f"
"gitHead": "0826bc0e393692611c23e8e5be7e24eb8b661dba"
}

@@ -29,4 +29,10 @@ require('./tracer').initTracer();

app.use(express.urlencoded({ extended: false, limit: '50mb' }));
app.use(express.json());
app.all('/message-delivery-status', handleMessageDeliveryStatus);
app.all('/message-delivery-status', (req, res, next) => {
logger.info('test', {
meta: { body: req.body }
});
next();
}, handleMessageDeliveryStatus);

@@ -33,0 +39,0 @@ app.all('/health', (req, res) => {

@@ -50,8 +50,8 @@ const baseLogger = require('../logger');

module.exports = async function handleMessageDeliverStatus (req, res) {
const { app: { locals: { context } } } = req;
module.exports = async (req, res) => {
const { body, app: { locals: { context } } } = req;
try {
logger.info('req.body', req.body);
if (!isValidRequest(req.body)) {
logger.info('req.body1', req.body);
logger.info('body', body);
if (!isValidRequest(body)) {
logger.info('body1', body);
res.writeHead(500, { 'Content-Type': 'text/xml' });

@@ -61,6 +61,6 @@ res.end();

}
logger.info('req.body2', req.body);
logger.info('body2', body);
const messageStatus = req.body.MessageStatus;
const messageSid = req.body.MessageSid;
const messageStatus = body.MessageStatus;
const messageSid = body.MessageSid;
switch (messageStatus) {

@@ -67,0 +67,0 @@ case 'queued':

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