minor changes
This commit is contained in:
1 parent
835b7eb918
commit
d91e015f88
1 file changed
+2
-3
@@ -1,6 +1,5 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const auth = require('../cfg/auth.js');
|
||||||
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
|
|
||||||
|
|
||||||
// this function retrieve the users' data from Keystone
|
// this function retrieve the users' data from Keystone
|
||||||
async function getLeads(lastRunDate, currentDate, unsent, test) {
|
async function getLeads(lastRunDate, currentDate, unsent, test) {
|
||||||
@@ -8,7 +7,7 @@ async function getLeads(lastRunDate, currentDate, unsent, test) {
|
|||||||
const response = await fetch('https://smarthub.keystoneacademic.com/api/rest/getLead', {
|
const response = await fetch('https://smarthub.keystoneacademic.com/api/rest/getLead', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'x-api-key': process.env.KEYSTONE_API_KEY,
|
'x-api-key': auth.apiKey,
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user