filter based only on date and not datetime, all leads also readed

This commit is contained in:
ptorric committed 2026-08-26 11:13:14 +02:00
1 parent 38f488a8f3
commit ef91b7f53e
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -12,8 +12,8 @@ async function getLeads(lastRunDate, currentDate, unsent, test) {
'Content-type': 'application/json'
},
body: JSON.stringify({
after: lastRunDate,
before: currentDate,
after: lastRunDate.substring(0, 10),
before: currentDate.substring(0, 10),
unsent: unsent, // If this variable is set to 0, then it will show leads that have been marked as seen (old leads)
test: test, // If this is removed or set to 0, then all leads that are returned would be marked as seen. This allows you to only fetch new leads
})
+2 -2
View File
@@ -148,9 +148,9 @@ async function runConnector() {
}
try {
console.log('Retrieving data from Keystone...');
console.log('Retrieving data from Keystone...', lastRunDate, currentDate, isDryRun );
// getLeads(lastRunDate, currentDate, unsent, test)
const unsetValue = 1;
const unsetValue = 0;
const testValue = isDryRun ? 1 : 0;
const leads = await getLeads(lastRunDate, currentDate, unsetValue, testValue);