Make the log statements unique for each route.

This commit is contained in:
PhilRunninger 2023-03-01 17:51:01 -05:00
parent bc9aa4a456
commit 59cb926d9c

View File

@ -203,7 +203,7 @@ server.post('/swap', bodyParser.json(), function(req, res) {
res.send("no body was sent"); res.send("no body was sent");
return; return;
} }
console.log(new Date().toISOString() + "-------------------------get swap fit:------------------------------") console.log(new Date().toISOString() + "-------------------------post swap:------------------------------")
console.log(req.body); console.log(req.body);
//parse the where clause into the main sql statement //parse the where clause into the main sql statement
sql = sql.replace(new RegExp("where_clause", 'g'), w); sql = sql.replace(new RegExp("where_clause", 'g'), w);
@ -246,7 +246,7 @@ server.post('/cust_swap', bodyParser.json(), function(req, res) {
res.send("no body was sent"); res.send("no body was sent");
return; return;
} }
console.log(new Date().toISOString() + "-------------------------get swap fit:------------------------------") console.log(new Date().toISOString() + "-------------------------cust swap:------------------------------")
console.log(req.body); console.log(req.body);
//parse the where clause into the main sql statement //parse the where clause into the main sql statement
sql = sql.replace(new RegExp("where_clause", 'g'), w); sql = sql.replace(new RegExp("where_clause", 'g'), w);
@ -553,7 +553,7 @@ server.post('/scale_vp_sales', bodyParser.json(), function(req, res) {
res.send("no body was sent"); res.send("no body was sent");
return; return;
} }
console.log(new Date().toISOString() + "--------------------scale volume & price:-------------------"); console.log(new Date().toISOString() + "--------------------scale volume & price sales:-------------------");
req.body.stamp = new Date().toISOString() req.body.stamp = new Date().toISOString()
console.log(req.body); console.log(req.body);
//console.log(args); //console.log(args);
@ -699,4 +699,4 @@ function build_where(req, c, w, d, args) {
AND order_date >= least('` + req.body.stamp + "'::date,'2021-06-01')"; AND order_date >= least('` + req.body.stamp + "'::date,'2021-06-01')";
} }
return { c, w, d }; return { c, w, d };
} }