file fetchLeads.js renamed 'fetchLeadsFromKeystone.js'
This commit is contained in:
1 parent
7b8ceccf49
commit
b7afd4ddf0
2 files changed
+2
-3
No files matched your search
@@ -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 [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -26,7 +26,7 @@ app.get('/install', async (req, res) => {
|
|||||||
|
|
||||||
app.get('/renew', async (req, res) => {
|
app.get('/renew', async (req, res) => {
|
||||||
const refreshTokenProof = {
|
const refreshTokenProof = {
|
||||||
grant_type: 'refresh_token',
|
grant_type: 'refresh_token',
|
||||||
client_id: auth.hClientId,
|
client_id: auth.hClientId,
|
||||||
client_secret: auth.hClientSecret,
|
client_secret: auth.hClientSecret,
|
||||||
redirect_uri: auth.hCallback,
|
redirect_uri: auth.hCallback,
|
||||||
|
|||||||
Reference in new issue
Block a user