fix(subscriptions): fixed organization creation failure introduced by subscription updates#361
Merged
Conversation
… subscription updates
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
PR Summary
This PR fixes organization creation failures by implementing proper subscription transfer and seat management functionality. The changes include new API endpoints and improved error handling for subscription operations.
- New
/api/user/subscription/[id]/transfer/route.tsimplements secure subscription transfers between users and organizations with proper validation - Refactored seat management in
/api/user/subscription/[id]/seats/route.tswith improved metadata handling and permission checks - Bug in test case
/api/user/subscription/[id]/transfer/route.test.tswhere 'should transfer a personal subscription' test expects failure (403) instead of success - Improved type safety and error handling in
team-management.tsxwith proper TypeScript types and consolidated seat management logic - Modified
auth.tsto correctly handle both team and enterprise plan subscribers for organization creation
7 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile
waleedlatif1
added a commit
that referenced
this pull request
May 15, 2025
… subscription updates (#361) * fix(subscriptions): fixed organization creation failure introduced by subscription updates * cleaned up tests * run format
6 tasks
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.
Description
Fixed organization creation failure introduced by subscription updates
Type of change
How Has This Been Tested?
Tested issuance of plan, and that I was prompted in team management to create an org and then once I created it I could manage the seats and have visibility into my org.
Checklist:
npm test)Security Considerations: