Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Gauravudia <[email protected]>
  • Loading branch information
shrouti1507 and Gauravudia authored Apr 25, 2024
1 parent fef4868 commit fc3def4
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 @@ -26,11 +26,8 @@ steps:
$.assert(.message.properties.index, 'Missing required value from "properties.index"');
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 eventType = .message.properties?.eventType ?? eventTypeMap[event];
let eventSubType = .message.properties?.eventSubtype in $.ALLOWED_EVENT_SUBTYPES && eventType === 'conversion' ? .message.properties.eventSubtype: null;
$.assert(eventType, "eventType is mandatory for track call");
let payload = .message.().({
index: .properties.index,
Expand Down

0 comments on commit fc3def4

Please sign in to comment.