From 725939f448e7104791a5f4b4d36922931133ee6d Mon Sep 17 00:00:00 2001 From: mihir-4116 Date: Tue, 14 Nov 2023 14:52:19 +0530 Subject: [PATCH] fix: sonar code smell --- src/cdk/v2/destinations/gladly/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cdk/v2/destinations/gladly/utils.js b/src/cdk/v2/destinations/gladly/utils.js index 2b9459fb58c..5abc9b6dd0f 100644 --- a/src/cdk/v2/destinations/gladly/utils.js +++ b/src/cdk/v2/destinations/gladly/utils.js @@ -22,9 +22,11 @@ const identifierTypeKey = 'context.externalId.0.identifierType'; const getHeaders = (destination) => { const { apiToken, userName } = destination.Config; + const credentials = `${userName}:${apiToken}`; + const base64Credentials = base64Convertor(credentials); return { 'Content-Type': 'application/json', - Authorization: `Basic ${base64Convertor(`${userName}:${apiToken}`)}`, + Authorization: `Basic ${base64Credentials}`, }; };