File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
apps/webapp/app/presenters Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,12 @@ import { User } from "~/models/user.server";
10
10
import { z } from "zod" ;
11
11
import { projectPath } from "~/utils/pathBuilder" ;
12
12
import { JobRunStatus } from "@trigger.dev/database" ;
13
+ import { BasePresenter } from "./v3/basePresenter.server" ;
13
14
14
15
export type ProjectJob = Awaited < ReturnType < JobListPresenter [ "call" ] > > [ 0 ] ;
15
16
16
- export class JobListPresenter {
17
- #prismaClient: PrismaClient ;
18
-
19
- constructor ( prismaClient : PrismaClient = prisma ) {
20
- this . #prismaClient = prismaClient ;
21
- }
17
+ export class JobListPresenter extends BasePresenter {
18
+
22
19
23
20
public async call ( {
24
21
userId,
@@ -39,7 +36,7 @@ export class JobListPresenter {
39
36
? { some : { integration : { slug : integrationSlug } } }
40
37
: { } ;
41
38
42
- const jobs = await this . #prismaClient . job . findMany ( {
39
+ const jobs = await this . _replica . job . findMany ( {
43
40
select : {
44
41
id : true ,
45
42
slug : true ,
@@ -106,7 +103,7 @@ export class JobListPresenter {
106
103
} [ ] ;
107
104
108
105
if ( jobs . length > 0 ) {
109
- latestRuns = await this . #prismaClient . $queryRaw <
106
+ latestRuns = await this . _replica . $queryRaw <
110
107
{
111
108
createdAt : Date ;
112
109
status : JobRunStatus ;
You can’t perform that action at this time.
0 commit comments