Skip to content

fix: Ensure either text or html is a required field - #130

Merged
bukinoshita merged 2 commits into
resend:mainfrom
jayanratna:feat-required-values
Jul 10, 2023
Merged

bukinoshita merged 2 commits into
resend:mainfrom
jayanratna:feat-required-values

Conversation

@jayanratna

@jayanratna jayanratna commented Jul 8, 2023 •

Copy link
Copy Markdown
Contributor

This PR updates the CreateEmailOptions type to ensure either text or html is set for the email payload to be valid.

This will ensure that either CreateEmailWithHtmlOptions or CreateEmailWithTextOptions is required. This change also allows both html & text to be used at the same time.

This PR also updates the tests to ensure that any mock tests without html or text contain either on of the fields.

@bukinoshita bukinoshita changed the title Ensure either text or html is a required field fix: Ensure either text or html is a required field Jul 10, 2023
@bukinoshita bukinoshita changed the title fix: Ensure either text or html is a required field fix: Ensure either text or html is a required field Jul 10, 2023
@bukinoshita
bukinoshita merged commit b4f3548 into resend:main Jul 10, 2023
@jayanratna
jayanratna deleted the feat-required-values branch July 16, 2023 05:58
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.

2 participants