filter based only on date and not datetime, all leads also readed
This commit is contained in:
1 parent
38f488a8f3
commit
ef91b7f53e
2 files changed
+4
-4
No files matched your search
@@ -12,8 +12,8 @@ async function getLeads(lastRunDate, currentDate, unsent, test) {
|
|||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json'
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
after: lastRunDate,
|
after: lastRunDate.substring(0, 10),
|
||||||
before: currentDate,
|
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)
|
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
|
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
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -148,9 +148,9 @@ async function runConnector() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('Retrieving data from Keystone...');
|
console.log('Retrieving data from Keystone...', lastRunDate, currentDate, isDryRun );
|
||||||
// getLeads(lastRunDate, currentDate, unsent, test)
|
// getLeads(lastRunDate, currentDate, unsent, test)
|
||||||
const unsetValue = 1;
|
const unsetValue = 0;
|
||||||
const testValue = isDryRun ? 1 : 0;
|
const testValue = isDryRun ? 1 : 0;
|
||||||
const leads = await getLeads(lastRunDate, currentDate, unsetValue, testValue);
|
const leads = await getLeads(lastRunDate, currentDate, unsetValue, testValue);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user