diff --git a/src/server.js b/src/server.js index 1619fb2..999432c 100644 --- a/src/server.js +++ b/src/server.js @@ -35,12 +35,12 @@ module.exports = function Server(port) { console.debug("POST:", data); //process the all data request types client.processIncomingData(data).then(result => { - res.end(JSON.stringify(result[0])); - if (result[1]) { + res.end(JSON.stringify(result[0])); //result[0] = full data + if (result[1]) { //result[1] = mode (ie: DATA/TAG/NOTE) refresher.countdown; if (['DATA', 'TAG', 'NOTE'].includes(result[1])) sendToLiveRequests(result[0]); - intra.forwardToNextNode(result[2], result[0]); + intra.forwardToNextNode(result[1], result[0]); }; }).catch(error => { if (error instanceof INVALID)