Skip to content

fix(team): fix organization invitation URL for teams#1232

Merged
waleedlatif1 merged 1 commit intostagingfrom
fix/workspace-in
Sep 3, 2025
Merged

fix(team): fix organization invitation URL for teams#1232
waleedlatif1 merged 1 commit intostagingfrom
fix/workspace-in

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

fix organization invitation URL for teams

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel vercel bot temporarily deployed to Preview – docs September 3, 2025 14:58 Inactive
@vercel
Copy link

vercel bot commented Sep 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Sep 3, 2025 3:02pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 3, 2025 3:02pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

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

Edit Code Review Bot Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 36c98d1 into staging Sep 3, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/workspace-in branch September 3, 2025 15:05
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
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.

1 participant