@@ -7,16 +7,16 @@ import {
77} from "@heroicons/react/20/solid" ;
88import { ArrowDownCircleIcon , ArrowUpCircleIcon } from "@heroicons/react/24/outline" ;
99import { Form , useLocation , useNavigation } from "@remix-run/react" ;
10- import { ActionFunctionArgs } from "@remix-run/server-runtime" ;
10+ import { type ActionFunctionArgs } from "@remix-run/server-runtime" ;
1111import { uiComponent } from "@team-plain/typescript-sdk" ;
1212import { GitHubLightIcon } from "@trigger.dev/companyicons" ;
1313import {
14- FreePlanDefinition ,
15- Limits ,
16- PaidPlanDefinition ,
17- Plans ,
18- SetPlanBody ,
19- SubscriptionResult ,
14+ type FreePlanDefinition ,
15+ type Limits ,
16+ type PaidPlanDefinition ,
17+ type Plans ,
18+ type SetPlanBody ,
19+ type SubscriptionResult ,
2020} from "@trigger.dev/platform" ;
2121import React , { useEffect , useState } from "react" ;
2222import { z } from "zod" ;
@@ -75,8 +75,8 @@ export async function action({ request, params }: ActionFunctionArgs) {
7575 message : message || undefined ,
7676 } ) ;
7777
78- const organization = await prisma . organization . findUnique ( {
79- where : { slug : organizationSlug } ,
78+ const organization = await prisma . organization . findFirst ( {
79+ where : { slug : organizationSlug , members : { some : { userId : user . id } } } ,
8080 } ) ;
8181
8282 if ( ! organization ) {
0 commit comments