File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
apps/webapp/app/presenters Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
- import { PrismaClient , prisma } from "~/db.server" ;
2
- import { logger } from "~/services/logger.server" ;
3
1
import { BillingService } from "../services/billing.server" ;
2
+ import { BasePresenter } from "./v3/basePresenter.server" ;
4
3
5
- export class OrgBillingPlanPresenter {
6
- #prismaClient: PrismaClient ;
7
-
8
- constructor ( prismaClient : PrismaClient = prisma ) {
9
- this . #prismaClient = prismaClient ;
10
- }
11
-
4
+ export class OrgBillingPlanPresenter extends BasePresenter {
12
5
public async call ( { slug, isManagedCloud } : { slug : string ; isManagedCloud : boolean } ) {
13
6
const billingPresenter = new BillingService ( isManagedCloud ) ;
14
7
const plans = await billingPresenter . getPlans ( ) ;
@@ -17,7 +10,7 @@ export class OrgBillingPlanPresenter {
17
10
return ;
18
11
}
19
12
20
- const organization = await this . #prismaClient . organization . findFirst ( {
13
+ const organization = await this . _replica . organization . findFirst ( {
21
14
where : {
22
15
slug,
23
16
} ,
@@ -27,7 +20,7 @@ export class OrgBillingPlanPresenter {
27
20
return ;
28
21
}
29
22
30
- const maxConcurrency = await this . #prismaClient . $queryRaw <
23
+ const maxConcurrency = await this . _replica . $queryRaw <
31
24
{ organization_id : string ; max_concurrent_runs : BigInt } [ ]
32
25
> `WITH events AS (
33
26
SELECT
You can’t perform that action at this time.
0 commit comments