fix getLastTransactionDate off by 1 day

This commit is contained in:
Robert Dyer
2024-08-04 18:22:21 -05:00
parent f4ba29d955
commit 15301fda78
+5 -1
View File
@@ -59,7 +59,11 @@ module.exports = {
return data.data; return data.data;
}, },
getLastTransactionDate: async function (account, cutoffDate=new Date()) { getLastTransactionDate: async function (account, cutoffDate=undefined) {
if (cutoffDate === undefined) {
cutoffDate = new Date();
cutoffDate.setDate(cutoffDate.getDate() + 1);
}
const data = await api.runQuery( const data = await api.runQuery(
api.q('transactions') api.q('transactions')
.filter({ .filter({