file fetchLeads.js renamed 'fetchLeadsFromKeystone.js'

This commit is contained in:
Denise_Datinguinoo committed 2026-08-21 14:13:10 +02:00
1 parent 7b8ceccf49
commit b7afd4ddf0
2 files changed
+2 -3

No files matched your search

@@ -1,6 +1,5 @@
const path = require('path');
const fs = require('fs');
const FILE_PATH = path.resolve(__dirname, './last-modified-date.json');
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
@@ -42,7 +41,7 @@ async function getLeads(lastRunDate, currentDate, unsent, test) {
return result.data;
}
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 [];
}
}
+1 -1
View File
@@ -26,7 +26,7 @@ app.get('/install', async (req, res) => {
app.get('/renew', async (req, res) => {
const refreshTokenProof = {
grant_type: 'refresh_token',
grant_type: 'refresh_token',
client_id: auth.hClientId,
client_secret: auth.hClientSecret,
redirect_uri: auth.hCallback,