refactor: migrate account emails to dedicated api#1653
refactor: migrate account emails to dedicated api#1653arpitgupta1214 wants to merge 2 commits intotestfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR removes a Next.js API route handler for fetching account emails and replaces it with a client-side React hook ( Changes
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested Reviewers
Poem
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This PR refactors API communication, migrates to a new endpoint, and changes authentication logic (Privy bearer tokens), which are high-impact changes requiring human review.
|
Reopening from the proper branch name. |
Summary
/api/account-emailsrouteaccount_idcontract from the frontenduseAccountEmailsso it owns its query keyTesting
fetchAccountEmailsSummary by cubic
Migrated account email lookups to the dedicated accounts API with bearer auth, removed the local route, and switched consumers to a shared hook for simpler and safer fetching.
useAccountEmailshook that owns its query key and requires auth.fetchAccountEmailsto call/api/accounts/emailswithaccount_idparams andAuthorizationheader.FileInfoDialogandTasksListwith the new hook./api/account-emails.account_idcontract.Written for commit 130d00f. Summary will update on new commits.
Summary by CodeRabbit