Skip to content

feat: capture sender avatar and receiver phone number in gift creation#266

Merged
Emrys02 merged 1 commit into
zendvolabs:mainfrom
mansory-01:issue_249
Jun 4, 2026
Merged

feat: capture sender avatar and receiver phone number in gift creation#266
Emrys02 merged 1 commit into
zendvolabs:mainfrom
mansory-01:issue_249

Conversation

@mansory-01

Copy link
Copy Markdown
Contributor

This PR updates the gift creation flow to accurately capture and persist the new sender and receiver fields introduced in the latest design updates. Specifically, it adds support for storing the sender's uploaded image URL and the receiver's phone number when a new gift is sent.

Changes Made

  • Database Schema: Added recipientPhone to the gifts table schema and generated the accompanying Drizzle migration (0002_peaceful_tag.sql). (Note: The senderAvatar column was already present in the schema).
  • Validation: Updated CreateGiftSchema in src/lib/validation.ts to accept senderAvatar (validates as URL) and recipientPhone (validates using the existing E.164 formatting logic via validateE164PhoneNumber). Both fields allow optional/empty inputs.
  • API Endpoint (POST /api/gifts): Modified the gift creation route to destructure, sanitize (using sanitizePhoneNumber), and map these new fields accurately when inserting a new gift record into the database.

closes #249

@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

@mansory-01 is attempting to deploy a commit to the lewechifavour466-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 4, 2026

Copy link
Copy Markdown

@mansory-01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🚀 Done Verification Checklist

  • Problem & Impact: Does the description clearly state the problem and the impact of the fix?
  • Issue Linked: Does the PR description include Closes #XXX?
  • Tests: Have you added/updated tests?
  • UI Screenshots: If this is a frontend change, have you attached screenshots or a video?
  • Code Quality: Does the code follow the [Zendvo Five Principles]?

This is an automated reminder to ensure high-quality contributions.

@Emrys02 Emrys02 merged commit d4f769f into zendvolabs:main Jun 4, 2026
7 of 9 checks passed
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.

Update Gift Creation API (Sender Details)

2 participants