another bug pulverised - legrec instead of logsent thanks harrison

This commit is contained in:
Expand-sys 2021-04-27 10:15:33 +10:00
parent c5f646a411
commit 014ae93cfd

View file

@ -153,13 +153,14 @@ app.get('/BankF', ensureAuthenticated, async function(req, res){
console.log(logrec.timings)
console.log("query finished "+Date.now())
logsent = logsent.body.value
if(logsent == 1 || logsent == -1 || logrec == null){
console.log(logsent)
if(logsent === 1 || logsent === -1 || logsent == null){
logsent = undefined
}else{
logsent = await logsent.filter(({ from }) => from === req.session.user)
}
logrec = logrec.body.value
if(logrec == 1 || logrec == -1 || logrec == null){
if(logrec === 1 || logrec === -1 || logrec === null){
logrec = undefined
} else{
logrec = await logrec.filter(({ to }) => to === req.session.user)