From f16ca7d7edc6a91618cbc0ba510e5b6a4d24d122 Mon Sep 17 00:00:00 2001 From: Ian Webster Date: Mon, 30 Jun 2014 22:20:48 -0700 Subject: [PATCH] Use processed number instead of request number --- app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 4e284ff..6dfc123 100644 --- a/app.js +++ b/app.js @@ -63,7 +63,7 @@ app.post('/intl', function(req, res) { }); function textRequestHandler(req, res, number, region, key) { - if (!req.body.number || !req.body.message) { + if (!number || !req.body.message) { mpq.track('incomplete request'); res.send({success:false,message:'Number and message parameters are required.'}); return; @@ -78,7 +78,7 @@ function textRequestHandler(req, res, number, region, key) { } var tracking_details = { - number: req.body.number, + number: number, message: req.body.message, ip: ip }; @@ -87,7 +87,7 @@ function textRequestHandler(req, res, number, region, key) { response_obj = response_obj || {}; // Time to actually send the message - sendText(req.body.number, message, region, function(err) { + sendText(number, message, region, function(err) { if (err) { mpq.track('sendText failed', tracking_details); res.send(_.extend(response_obj,