mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-17 07:12:12 +11:00
yeet
This commit is contained in:
parent
1fe361e67d
commit
7e9bc89e00
1 changed files with 20 additions and 20 deletions
40
index.js
40
index.js
|
|
@ -161,7 +161,7 @@ fastify.get(
|
|||
let final = []
|
||||
let final2 = [];
|
||||
|
||||
if(log != null){
|
||||
/*if(log != null){
|
||||
let graphlog = log.reverse();
|
||||
|
||||
|
||||
|
|
@ -192,34 +192,34 @@ fastify.get(
|
|||
final2.unshift(["Transaction", "Amount"])
|
||||
|
||||
|
||||
for(i = 0; i < log.length; i++){
|
||||
|
||||
}*/
|
||||
for(i = 0; i < log.length; i++){
|
||||
|
||||
|
||||
if(log[i].amount > 0){
|
||||
let absol = Math.abs(log[i].amount)
|
||||
let date = new Date(log[i].time * 1000)
|
||||
transactionlog.push(`You sent ${log[i].counterparty} ${absol} at ${date}`);
|
||||
|
||||
} else {
|
||||
let date = new Date(log[i].time * 1000)
|
||||
let absol = Math.abs(log[i].amount)
|
||||
transactionlog.push(`${log[i].counterparty} sent you ${absol} at ${date}`);
|
||||
|
||||
}
|
||||
if(log[i].amount > 0){
|
||||
let absol = Math.abs(log[i].amount)
|
||||
let date = new Date(log[i].time * 1000)
|
||||
transactionlog.push(`You sent ${log[i].counterparty} ${absol} at ${date}`);
|
||||
|
||||
} else {
|
||||
let date = new Date(log[i].time * 1000)
|
||||
let absol = Math.abs(log[i].amount)
|
||||
transactionlog.push(`${log[i].counterparty} sent you ${absol} at ${date}`);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
console.log("begin render " + Date.now());
|
||||
|
||||
let maxgraph = balance + 1000;
|
||||
let stringgraphdata = JSON.stringify(final2)
|
||||
console.log(stringgraphdata)
|
||||
let graphdata = stringgraphdata.slice(1,stringgraphdata.length-1)
|
||||
//let maxgraph = balance + 1000;
|
||||
//let stringgraphdata = JSON.stringify(final2)
|
||||
//console.log(stringgraphdata)
|
||||
//let graphdata = stringgraphdata.slice(1,stringgraphdata.length-1)
|
||||
res.view("bankf", {
|
||||
transactionlog: transactionlog,
|
||||
maxgraph: maxgraph,
|
||||
graphdata: graphdata,
|
||||
//maxgraph: maxgraph,
|
||||
//graphdata: graphdata,
|
||||
user: req.session.get("user"),
|
||||
balance: balance,
|
||||
admin: req.session.get("admin"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue