Skip to content

Conversation

@B77Mills
Copy link
Member

@B77Mills B77Mills commented Oct 16, 2025

Add support to only spread the product when they are present as well

example send to the api and our request to omeda. It was a first name of Brian
Screenshot 2025-10-16 at 1 40 04 PM

Update within omeda without sending productId
Screenshot 2025-10-16 at 1 40 14 PM

Add support to only spread the producst when they are present as well
@brandonbk brandonbk changed the title Remove ProductId and option input Make product id optional Oct 20, 2025
});
}),
}),
Emails: [{ EmailAddress: email }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the above section when the product map is initialized to include the product id only if one is set. L374

-  const productMap = new Map([[input.productId, true]]);
+  const productMap = new Map([...(input.productId ? [input.productId, true] : [])]);

@B77Mills B77Mills requested a review from solocommand October 20, 2025 18:24
@B77Mills B77Mills marked this pull request as ready for review October 20, 2025 18:31
const promoCode = input.promoCode ? input.promoCode.trim() : null;
if (promoCode && promoCode.length > 50) throw new UserInputError('The promo code must be 50 characters or fewer.');
const productMap = new Map([[input.productId, true]]);
const productMap = new Map([...(input.productId ? [input.productId, true] : [])]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spread is redundant, and could be

const productMap = new Map(input.productId ? [input.productId, true] : []);

But ultimately doesn't matter :)

@brandonbk brandonbk merged commit 21e1ced into parameter1:main Oct 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants