diff --git a/server.js b/server.js index 179aa1f..1e6f768 100644 --- a/server.js +++ b/server.js @@ -91,6 +91,7 @@ app.post('/', function(req, res){ "INSERT INTO alerts (origjson, coreid, published_at, status) VALUES ($1, $2, $3, $4);", [JSON.stringify(req.body, null, 4), coreid, pubAt, status] ); + done(); }); } else { // parse for minimal data from cell modem. var deviceid = JSON.stringify(req.body.data, null, 4).slice(1,4); @@ -112,6 +113,7 @@ app.post('/', function(req, res){ "INSERT INTO alerts (origjson, coreid, published_at, status) VALUES ($1, $2, $3, $4);", [JSON.stringify(req.body, null, 4), deviceid, received_at, statusFromCode] ); + done(); }); } res.status(204).send('POST received');