file fetchLeads.js renamed 'fetchLeadsFromKeystone.js'
This commit is contained in:
1 parent
7b8ceccf49
commit
b7afd4ddf0
1 file changed
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const FILE_PATH = path.resolve(__dirname, './last-modified-date.json');
|
|
||||||
|
|
||||||
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
|
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
|
||||||
|
|
||||||
@@ -42,7 +41,7 @@ async function getLeads(lastRunDate, currentDate, unsent, test) {
|
|||||||
return result.data;
|
return result.data;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.log("Error fetching the data: ", error);
|
console.error("Error fetching the data: ", JSON.stringify(error.response?.data, null, 2) || error.message);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user