Skip to content

Add uploadedImageSchema#2363

Merged
steven-tey merged 2 commits into
mainfrom
uploadedImageSchema
Apr 28, 2025
Merged

Add uploadedImageSchema#2363
steven-tey merged 2 commits into
mainfrom
uploadedImageSchema

Conversation

@steven-tey
Copy link
Copy Markdown
Collaborator

No description provided.

@steven-tey steven-tey requested a review from Copilot April 28, 2025 00:27
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
dub ✅ Ready (Inspect) Visit Preview Apr 28, 2025 0:40am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@steven-tey steven-tey merged commit 53a6f94 into main Apr 28, 2025
7 checks passed
@steven-tey steven-tey deleted the uploadedImageSchema branch April 28, 2025 00:45
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