diff --git a/backend/controllers/crmController.js b/backend/controllers/crmController.js index d6762e5..bb076e3 100644 --- a/backend/controllers/crmController.js +++ b/backend/controllers/crmController.js @@ -67,16 +67,15 @@ const callJournaling = async (req, res) => { let { companyId, operation, crmPhone, crmAgent, crmCallDuration, crmFirstName, operationStatus } = req.body - console.log('REQ.BODY CRM TESTe: ', JSON.stringify(req.body, null, 6)) - - // return res.status(StatusCodes.OK).send() + console.log('REQ.BODY CRM TESTe: ', JSON.stringify(req.body, null, 6)) + // Refactor this in the future. crmPhone = '55' + crmPhone console.log('========> CRMPHONE: ', crmPhone) - console.log('========> COMPANY ID before: ', companyId) companyId = '40' console.log('========> COMPANY ID after: ', companyId) + // mustContainProperties(req, ['companyId', 'operation', 'crmPhone', 'crmAgent',]) diff --git a/backend/utils/journalingRequest.js b/backend/utils/journalingRequest.js index 28428f1..a0b8c78 100644 --- a/backend/utils/journalingRequest.js +++ b/backend/utils/journalingRequest.js @@ -105,13 +105,13 @@ async function journalingRequest(request, body, crmCallDuration, contact, crmAge // Refactor this. Some times the crmCallDuration is comming with the value like 'crmCallDuration' instead of number when // creating call journaling for salesforce - if (url.includes('salesforce')) { - for (let key in data) { - if (data[key] == 'crmCallDuration') { - data[key] = 300 - } - } - } + // if (url.includes('salesforce')) { + // for (let key in data) { + // if (data[key] == 'crmCallDuration') { + // data[key] = 300 + // } + // } + // } const { type, userName, passWord, token, crmClientId } = authentication