From 8c8e8b22e4ab0f3b0f4817e818697319bf35f38b Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 27 Feb 2019 14:23:31 -0500 Subject: [PATCH] reflect jsonb build in route --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index fb5f5ff..a0e5d61 100644 --- a/index.js +++ b/index.js @@ -91,6 +91,7 @@ server.get('/get_pool', bodyParser.json(), function (req,res) { //------------------------------------------set base SQL------------------------------------ var w = ` + WITH rows AS ( SELECT ---------customer info----------------- bill_cust_descr @@ -164,7 +165,9 @@ server.get('/get_pool', bodyParser.json(), function (req,res) { ,request_month ,promo ,version - ,iter`; + ,iter + ) + SELECT row_to_json(rows) x FROM rows`; //-----------------replace default quota_rep---------------------------------------------------- console.log(w); Postgres.FirstRow(w,args,res)