Skip to content

Commit

Permalink
chore: addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepdsvs committed Aug 29, 2024
1 parent c1cde0f commit 42fbce5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/v0/destinations/fb_custom_audience/recordTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ async function processRecordInputs(groupedRecordInputs) {
const { destination, connection } = groupedRecordInputs[0];
const { message } = groupedRecordInputs[0];
const { accessToken, disableFormat, type, subType, isRaw, maxUserCount } = destination.Config;
const audienceId = get(connection, 'config.destination.audienceId');
const isHashRequired = get(connection, 'config.destination.isHashRequired');
const audienceId = connection?.config?.destination?.audienceId;
const isHashRequired = connection?.config?.destination?.isHashRequired;
const prepareParams = {
access_token: accessToken,
};
Expand Down
1 change: 0 additions & 1 deletion src/v0/destinations/fb_custom_audience/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const { schemaFields, USER_ADD, USER_DELETE } = require('./config');

const { MappedToDestinationKey } = require('../../../constants');
const { processRecordInputs } = require('./recordTransform');
const logger = require('../../../logger');

function checkForUnsupportedEventTypes(dictionary, keyList) {
const unsupportedEventTypes = [];
Expand Down
3 changes: 1 addition & 2 deletions src/v0/destinations/fb_custom_audience/util.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const lodash = require('lodash');
const sha256 = require('sha256');
const crypto = require('crypto');
const get = require('get-value');
const jsonSize = require('json-size');
const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib');
const { TransformationError } = require('@rudderstack/integrations-lib');
Expand Down Expand Up @@ -49,7 +48,7 @@ const batchingWithPayloadSize = (payload) => {
};

const getSchemaForEventMappedToDest = (message) => {
const mappedSchema = get(message, 'fields');
const mappedSchema = message.fields;
if (!mappedSchema) {
throw new InstrumentationError(
'event.fields is required property for events mapped to destination ',
Expand Down

0 comments on commit 42fbce5

Please sign in to comment.