diff --git a/lib/mdot/track.js b/lib/mdot/track.js index 11f3d7f..fdee384 100644 --- a/lib/mdot/track.js +++ b/lib/mdot/track.js @@ -19,9 +19,11 @@ module.exports = function(app) { mdotRouter.post('/', function(req, res) { - logger.debug('body',req.body); + + var body = req.body; var data = {}; - if (!req.body.hasOwnProperty('locationid') || !req.body.hasOwnProperty('count') || !req.body.hasOwnProperty('total')) { + logger.debug('body', body); + if (!body.hasOwnProperty('locationid') || !body.hasOwnProperty('count') || !body.hasOwnProperty('total')) { logger.error('MDot','Missing required parameter'); res.status(400).send({ status: 'error',