Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Update organization on invite accept

Richie McIlroy8637b1f8d85d
diff --git a/apps/web/app/api/invite/accept/route.ts b/apps/web/app/api/invite/accept/route.ts
index af1da5bc7..55ebb6920 100644
--- a/apps/web/app/api/invite/accept/route.ts
+++ b/apps/web/app/api/invite/accept/route.ts
@@ -49,11 +49,11 @@ export async function POST(request: NextRequest) {
role: invite.role,
});
- // Update the user's thirdPartyStripeSubscriptionId
await db()
.update(users)
.set({
thirdPartyStripeSubscriptionId: organizationOwner.stripeSubscriptionId,
+ activeOrganizationId: invite.organizationId,
})
.where(eq(users.id, user.id));