Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): make zod optional #7056

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

tatarco
Copy link
Contributor

@tatarco tatarco commented Nov 18, 2024

What changed? Why was the change needed?

zod is failing preview calls

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
🔨 Latest commit ef424b1
🔍 Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/673b746496eb6a000869267e
😎 Deploy Preview https://deploy-preview-7056--novu-stg-vite-dashboard-poc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -61,26 +61,26 @@ const InAppRenderOutputSchema = z.object({
avatar: z.string().optional(),
primaryAction: z
.object({
label: z.string(),
label: z.string().optional(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is the right approach, it's invalid to have a primary action without a label, etc. The correct fix IMO is to not send an empty object for primaryAction when the primary action isn't needed.

Copy link
Contributor

@SokratisVidros SokratisVidros Nov 18, 2024

Choose a reason for hiding this comment

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

Are you talking about not sending an empty object from the FE to the API or preprocess the control values here?

@SokratisVidros SokratisVidros merged commit 22122b7 into next Nov 18, 2024
29 checks passed
@SokratisVidros SokratisVidros deleted the fix-zod-inapp-preview-issue branch November 18, 2024 17:17
desiprisg pushed a commit that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants