@@ -7,16 +7,16 @@ import {
7
7
} from "@heroicons/react/20/solid" ;
8
8
import { ArrowDownCircleIcon , ArrowUpCircleIcon } from "@heroicons/react/24/outline" ;
9
9
import { Form , useLocation , useNavigation } from "@remix-run/react" ;
10
- import { ActionFunctionArgs } from "@remix-run/server-runtime" ;
10
+ import { type ActionFunctionArgs } from "@remix-run/server-runtime" ;
11
11
import { uiComponent } from "@team-plain/typescript-sdk" ;
12
12
import { GitHubLightIcon } from "@trigger.dev/companyicons" ;
13
13
import {
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 ,
20
20
} from "@trigger.dev/platform" ;
21
21
import React , { useEffect , useState } from "react" ;
22
22
import { z } from "zod" ;
@@ -75,8 +75,8 @@ export async function action({ request, params }: ActionFunctionArgs) {
75
75
message : message || undefined ,
76
76
} ) ;
77
77
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 } } } ,
80
80
} ) ;
81
81
82
82
if ( ! organization ) {
0 commit comments