diff --git a/app.js b/app.js index 97c710a..f690ffa 100644 --- a/app.js +++ b/app.js @@ -24,7 +24,7 @@ app.get( '/', function( req, res ) { app.post( '/', function( req, res ) { if( process.env["LOG_REQUESTS"] ) { console.log("Logging request body"); - console.log(req.body); + console.log(JSON.stringify(req.body, null, 2)); // Pretty print } const changeSets = req.body.changeSets; @@ -39,7 +39,7 @@ app.post( '/', function( req, res ) { } ); // inform watchers - informWatchers( changeSets, res, muCallIdTrail ); + informWatchers( changeSets, res, muCallIdTrail ); // push relevant data to interested actors res.status(204).send(); @@ -118,7 +118,8 @@ function formatChangesetBody( changeSets, options ) { changeSets.map( (change) => { return { inserts: change.insert, - deletes: change.delete + deletes: change.delete, + index: change.index }; } ) ); }