mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 15:42:14 +11:00
quick patch fixing new user login
This commit is contained in:
parent
ec3ec448f2
commit
a1f37f44a6
1 changed files with 16 additions and 4 deletions
14
index.js
14
index.js
|
|
@ -210,7 +210,9 @@ app.get("/BankF", ensureAuthenticated, async function (req, res) {
|
||||||
logsent = logsent.body.value;
|
logsent = logsent.body.value;
|
||||||
let logrec = logsent;
|
let logrec = logsent;
|
||||||
let graphlog = logsent;
|
let graphlog = logsent;
|
||||||
|
if (graphlog != null) {
|
||||||
graphlog = graphlog.reverse();
|
graphlog = graphlog.reverse();
|
||||||
|
}
|
||||||
let graphdata = "";
|
let graphdata = "";
|
||||||
let currentbal = balance.value;
|
let currentbal = balance.value;
|
||||||
if (graphlog) {
|
if (graphlog) {
|
||||||
|
|
@ -226,10 +228,14 @@ app.get("/BankF", ensureAuthenticated, async function (req, res) {
|
||||||
} else {
|
} else {
|
||||||
graphlog = undefined;
|
graphlog = undefined;
|
||||||
}
|
}
|
||||||
|
if (graphdata != "") {
|
||||||
graphdata =
|
graphdata =
|
||||||
", [" + parseInt(graphlog.length) + "," + balance.value + "]" + graphdata;
|
", [" + parseInt(graphlog.length) + "," + balance.value + "]" + graphdata;
|
||||||
console.log(balance);
|
|
||||||
graphdata = '["transaction", "balance"]' + graphdata;
|
graphdata = '["transaction", "balance"]' + graphdata;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(balance);
|
||||||
|
|
||||||
console.log(JSON.stringify(graphdata));
|
console.log(JSON.stringify(graphdata));
|
||||||
if (logsent == 1 || logsent == -1 || logsent == null) {
|
if (logsent == 1 || logsent == -1 || logsent == null) {
|
||||||
logsent = undefined;
|
logsent = undefined;
|
||||||
|
|
@ -251,6 +257,12 @@ app.get("/BankF", ensureAuthenticated, async function (req, res) {
|
||||||
logsent[i].time = new Date(logsent[i].time);
|
logsent[i].time = new Date(logsent[i].time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (logrec != null) {
|
||||||
|
logrec.reverse();
|
||||||
|
}
|
||||||
|
if (logsent != null) {
|
||||||
|
logsent.reverse();
|
||||||
|
}
|
||||||
let maxgraph = balance + 1000;
|
let maxgraph = balance + 1000;
|
||||||
console.log("begin render " + Date.now());
|
console.log("begin render " + Date.now());
|
||||||
res.render("bankf", {
|
res.render("bankf", {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue