From 4553f8269921ca0b551e2879203d93bfedf8d8ba Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Mon, 15 Apr 2024 13:55:05 +0530 Subject: [PATCH] chore: address comments --- src/v0/destinations/hs/HSTransform-v2.js | 4 ++-- src/v0/destinations/hs/util.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/v0/destinations/hs/HSTransform-v2.js b/src/v0/destinations/hs/HSTransform-v2.js index 505b1ee4d9..3699e1c789 100644 --- a/src/v0/destinations/hs/HSTransform-v2.js +++ b/src/v0/destinations/hs/HSTransform-v2.js @@ -41,7 +41,7 @@ const { getEventAndPropertiesFromConfig, getHsSearchId, populateTraits, - addExternalIdToTraits, + addExternalIdToHSTraits, } = require('./util'); const { JSON_MIME_TYPE } = require('../../util/constant'); @@ -110,7 +110,7 @@ const processIdentify = async (message, destination, propertyMap) => { GENERIC_TRUE_VALUES.includes(mappedToDestination.toString()) && operation ) { - addExternalIdToTraits(message); + addExternalIdToHSTraits(message); if (!objectType) { throw new InstrumentationError('objectType not found'); } diff --git a/src/v0/destinations/hs/util.js b/src/v0/destinations/hs/util.js index 84e60bcc86..a24ae92793 100644 --- a/src/v0/destinations/hs/util.js +++ b/src/v0/destinations/hs/util.js @@ -815,7 +815,7 @@ const populateTraits = async (propertyMap, traits, destination) => { return populatedTraits; }; -const addExternalIdToTraits = (message) => { +const addExternalIdToHSTraits = (message) => { const externalIdObj = message.context?.externalId?.[0]; if (externalIdObj.useSecondaryObject) { /* this condition help us to NOT override the primary key value with the secondary key value @@ -830,7 +830,7 @@ const addExternalIdToTraits = (message) => { module.exports = { validateDestinationConfig, - addExternalIdToTraits, + addExternalIdToHSTraits, formatKey, fetchFinalSetOfTraits, getProperties,