diff --git a/index.js b/index.js index 3e71223..4684155 100644 --- a/index.js +++ b/index.js @@ -185,6 +185,7 @@ server.post('/addmonth_v', bodyParser.json(), function (req, res) { return; } console.log("-----------------------------add month volume:---------------------------------"); + req.body.stamp = new Date().toISOString() console.log(req.body); //console.log(args); sql = sql.replace(new RegExp("scenario = target_scenario",'g'),w); @@ -217,6 +218,7 @@ server.post('/addmonth_vp', bodyParser.json(), function (req, res) { return; } console.log("------------------add month volume and price:-------------------"); + req.body.stamp = new Date().toISOString() console.log(req.body); //console.log(args); sql = sql.replace(new RegExp("where_clause",'g'),w); @@ -259,6 +261,7 @@ server.post('/scale_v', bodyParser.json(), function (req, res) { return; } console.log("-----------------------scale volume:------------------------------"); + req.body.stamp = new Date().toISOString() console.log(req.body); //console.log(args); sql = sql.replace(new RegExp("where_clause",'g'),w); @@ -299,6 +302,7 @@ server.post('/scale_p', bodyParser.json(), function (req, res) { return; } console.log("--------------------scale price:-------------------"); + req.body.stamp = new Date().toISOString() console.log(req.body); //console.log(args); sql = sql.replace(new RegExp("where_clause",'g'),w); @@ -339,6 +343,7 @@ server.post('/scale_vp', bodyParser.json(), function (req, res) { return; } console.log("--------------------scale volume & price:-------------------"); + req.body.stamp = new Date().toISOString() console.log(req.body); //console.log(args); sql = sql.replace(new RegExp("where_clause",'g'),w); @@ -380,6 +385,7 @@ server.post('/new_part', bodyParser.json(), function (req, res) { return; } console.log("--------------------new part:-------------------"); + req.body.stamp = new Date().toISOString() console.log(req.body); //console.log(args); sql = sql.replace(new RegExp("where_clause",'g'),w); @@ -422,6 +428,7 @@ server.post('/new_basket', bodyParser.json(), function (req, res) { return; } console.log("--------------------new basket:-------------------"); + req.body.stamp = new Date().toISOString() console.log(req.body); //console.log(args); sql = sql.replace(new RegExp("where_clause",'g'),w);