From 582683cd154e643bad4c2252b201494b72b778a5 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 14 Mar 2019 11:05:00 -0400 Subject: [PATCH] adjust labels --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 3bb4d82..b95aaca 100644 --- a/index.js +++ b/index.js @@ -149,7 +149,7 @@ server.post('/addmonth_v', bodyParser.json(), function (req, res) { sql = sql.replace(new RegExp("target_increment",'g'),req.body.amount); sql = sql.replace(new RegExp("target_month",'g'),req.body.month); sql = sql.replace(new RegExp("replace_version",'g'),req.body.scenario.version); - sql = sql.replace(new RegExp("replace_iteration",'g'),req.body.iter); + sql = sql.replace(new RegExp("replace_source",'g'),req.body.source); sql = sql.replace(new RegExp("replace_iterdef",'g'),JSON.stringify(req.body)); //console.log(sql); console.log(sql) @@ -183,7 +183,7 @@ server.post('/addmonth_vp', bodyParser.json(), function (req, res) { sql = sql.replace(new RegExp("target_price",'g'),req.body.amount); sql = sql.replace(new RegExp("target_month",'g'),req.body.month); sql = sql.replace(new RegExp("replace_version",'g'),req.body.scenario.version); - sql = sql.replace(new RegExp("replace_iteration",'g'),req.body.iter); + sql = sql.replace(new RegExp("replace_source",'g'),req.body.source); sql = sql.replace(new RegExp("replace_iterdef",'g'),JSON.stringify(req.body)); //console.log(sql); Postgres.FirstRow(sql,[],res) @@ -223,7 +223,7 @@ server.post('/scale_v', bodyParser.json(), function (req, res) { sql = sql.replace(new RegExp("where_clause",'g'),w); sql = sql.replace(new RegExp("target_increment",'g'),req.body.amount); sql = sql.replace(new RegExp("replace_version",'g'),req.body.scenario.version); - sql = sql.replace(new RegExp("replace_iteration",'g'),req.body.iter); + sql = sql.replace(new RegExp("replace_source",'g'),req.body.source); sql = sql.replace(new RegExp("replace_iterdef",'g'),JSON.stringify(req.body)); //console.log(sql); Postgres.FirstRow(sql,[],res) @@ -263,7 +263,7 @@ server.post('/scale_p', bodyParser.json(), function (req, res) { sql = sql.replace(new RegExp("where_clause",'g'),w); sql = sql.replace(new RegExp("target_increment",'g'),req.body.amount); sql = sql.replace(new RegExp("replace_version",'g'),req.body.scenario.version); - sql = sql.replace(new RegExp("replace_iteration",'g'),req.body.iter); + sql = sql.replace(new RegExp("replace_source",'g'),req.body.source); sql = sql.replace(new RegExp("replace_iterdef",'g'),JSON.stringify(req.body)); //console.log(sql); Postgres.FirstRow(sql,[],res) @@ -304,7 +304,7 @@ server.post('/scale_vp', bodyParser.json(), function (req, res) { sql = sql.replace(new RegExp("target_vol",'g'),req.body.qty); sql = sql.replace(new RegExp("target_prc",'g'),req.body.amount); sql = sql.replace(new RegExp("replace_version",'g'),req.body.scenario.version); - sql = sql.replace(new RegExp("replace_iteration",'g'),req.body.iter); + sql = sql.replace(new RegExp("replace_source",'g'),req.body.source); sql = sql.replace(new RegExp("replace_iterdef",'g'),JSON.stringify(req.body)); //console.log(sql); Postgres.FirstRow(sql,[],res)