diff --git a/src/fetchLeadsFromKeystone.js b/src/fetchLeadsFromKeystone.js index 8a08883..ddbd35e 100644 --- a/src/fetchLeadsFromKeystone.js +++ b/src/fetchLeadsFromKeystone.js @@ -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 }) diff --git a/src/hubspotConnector.js b/src/hubspotConnector.js index 66d664b..9a30cbe 100644 --- a/src/hubspotConnector.js +++ b/src/hubspotConnector.js @@ -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);