This commit is contained in:
Trowbridge 2019-03-13 13:24:34 -04:00
parent e649fd84e0
commit c1ee6134d8

View File

@ -128,6 +128,15 @@ server.post('/addmonth_v', bodyParser.json(), function (req, res) {
var args = [];
var path = './route_sql/addmonth_vd.sql';
fs.readFile(path, 'utf8', function(err, data){
if (!err){
callback(data);
} else {
console.log("fatal error pulling sql file")
callback(err);
}
});
var callback = function(arg){
sql = arg;
//buile where clause expression
@ -151,15 +160,6 @@ server.post('/addmonth_v', bodyParser.json(), function (req, res) {
console.log(sql)
Postgres.FirstRow(sql,[],res)
}
fs.readFile(path, 'utf8', function(err, data){
if (!err){
callback(data);
} else {
console.log("fatal error pulling sql file")
callback(err);
}
});
})
server.post('/addmonth_vp', bodyParser.json(), function (req, res) {