fix(team): fix organization invitation URL for teams#1232
fix(team): fix organization invitation URL for teams#1232waleedlatif1 merged 1 commit intostagingfrom
Conversation
There was a problem hiding this comment.
Greptile Summary
This PR fixes a URL formatting issue in organization invitation emails. The change modifies two lines in the organization invitations API route (apps/sim/app/api/organizations/[id]/invitations/route.ts) by updating the invitation URL format from /invite/organization?id=${orgInvitation.id} to /invite/${orgInvitation.id}.
The issue stems from a mismatch between the backend URL generation and frontend routing expectations. The frontend invite component uses Next.js dynamic routing with the pattern /invite/[id], which expects the invitation ID to be passed as a URL path parameter that can be extracted using useParams(). The previous format used query parameters (?id=123) which wouldn't work with this dynamic route structure.
This change brings organization invitations in line with workspace invitations, which already use the correct URL format. The fix affects both batch invitation processing (line 342) and single invitation handling (line 355), ensuring consistency across all organization invitation flows. The modification integrates seamlessly with the existing invitation system, as evidenced by the workspace invitation implementation in the codebase that follows the same pattern.
Confidence score: 4/5
- This PR is safe to merge with low risk as it fixes a clear URL routing mismatch
- Score reflects a straightforward bug fix with well-understood root cause and minimal surface area for unintended consequences
- Pay attention to the invitation URL format to ensure it matches frontend routing expectations
1 file reviewed, no comments
Summary
fix organization invitation URL for teams
Type of Change
Testing
Tested manually.
Checklist