Add uploadedImageSchema#2363
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new schema uploadedImageSchema to support both base64 encoded images and URLs from dubassets.com, and replaces all occurrences of base64ImageSchema with the new schema across multiple modules.
- Added uploadedImageSchema in misc.ts for flexible image input validation
- Updated all schema files and API routes to utilize uploadedImageSchema instead of base64ImageSchema
- Ensured consistency in handling image inputs across workspaces, integrations, domains, partner profiles, program resources, and user routes
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apps/web/lib/zod/schemas/workspaces.ts | Replaced imported schema and logo property in workspace creation schema |
| apps/web/lib/zod/schemas/misc.ts | Added uploadedImageSchema definition supporting union for image values |
| apps/web/lib/zod/schemas/integration.ts | Switched to uploadedImageSchema for integration logos |
| apps/web/lib/zod/schemas/domains.ts | Updated domain schema to use uploadedImageSchema for logo validation |
| apps/web/lib/actions/partners/update-partner-profile.ts | Replaced base64ImageSchema with uploadedImageSchema in partner profile |
| apps/web/lib/actions/partners/program-resources/add-program-resource.ts | Updated logo resource schema to use uploadedImageSchema |
| apps/web/app/api/user/route.ts | Modified user schema image field to validate against uploadedImageSchema |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.