From a380f301b09820f943592cf97622def1ae87ca22 Mon Sep 17 00:00:00 2001 From: Expand-sys Date: Tue, 8 Jun 2021 07:10:35 +1000 Subject: [PATCH] un reversed the logs --- index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 7f569fd..0c84be4 100644 --- a/index.js +++ b/index.js @@ -192,7 +192,6 @@ app.get("/BankF", ensureAuthenticated, async function (req, res) { console.log(err); } let logsent; - let logrec; console.log("start " + Date.now()); try { logsent = await got.post( @@ -209,8 +208,9 @@ app.get("/BankF", ensureAuthenticated, async function (req, res) { } console.log("query finished " + Date.now()); logsent = logsent.body.value; - logrec = logsent; - let graphlog = logsent.reverse(); + let logrec = logsent; + let graphlog = logsent; + graphlog = graphlog.reverse(); console.log(graphlog); let graphdata = '["transaction", "balance"]'; let currentbal = balance.value; @@ -223,8 +223,6 @@ app.get("/BankF", ensureAuthenticated, async function (req, res) { graphdata = graphdata + ", [" + parseInt(i) + "," + currentbal + "]"; } } - - console.log(graphdata); if (logsent == 1 || logsent == -1 || logsent == null) { logsent = undefined; } else {