Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anantjain45823 committed Apr 15, 2024
1 parent f7ac042 commit 4553f82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/v0/destinations/hs/HSTransform-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const {
getEventAndPropertiesFromConfig,
getHsSearchId,
populateTraits,
addExternalIdToTraits,
addExternalIdToHSTraits,
} = require('./util');
const { JSON_MIME_TYPE } = require('../../util/constant');

Expand Down Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions src/v0/destinations/hs/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -830,7 +830,7 @@ const addExternalIdToTraits = (message) => {

module.exports = {
validateDestinationConfig,
addExternalIdToTraits,
addExternalIdToHSTraits,
formatKey,
fetchFinalSetOfTraits,
getProperties,
Expand Down

0 comments on commit 4553f82

Please sign in to comment.