Skip to content

Commit

Permalink
feat: review comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Apr 26, 2024
1 parent 561b93e commit 844d548
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/cdk/v2/destinations/algolia/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ steps:
let eventTypeMap = $.eventTypeMapping(.destination.Config);
let event = .message.event.trim().toLowerCase();
let eventType = .message.properties.eventType ?? eventTypeMap[event];
let eventSubType = .message.properties.eventSubtype && eventType === 'conversion' ?
.message.properties.eventSubtype in $.ALLOWED_EVENT_SUBTYPES ?
.message.properties.eventSubtype : null
: null;
let eventSubType = .message.properties.eventSubtype && eventType === 'conversion' && (.message.properties.eventSubtype in $.ALLOWED_EVENT_SUBTYPES) ? .message.properties.eventSubtype;
$.assert(eventType, "eventType is mandatory for track call");
let payload = .message.().({
index: .properties.index,
Expand All @@ -39,7 +36,7 @@ steps:
filters: .properties.filters,
objectIDs: .properties.objectIds,
positions: .properties.positions,
value: $.isDefinedAndNotNull(.properties.currency) ? .properties.value : null,
value: $.isDefinedAndNotNull(.properties.currency) ? .properties.value,
currency: .properties.currency,
userToken: {{{{$.getGenericPaths("userId", "||")}}}},
eventName: event,
Expand Down

0 comments on commit 844d548

Please sign in to comment.