File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ import { TestRunsService } from '../test-runs/test-runs.service';
66
77@Injectable ( )
88export class BuildsService {
9- constructor (
10- private prismaService : PrismaService ,
11- private testRunsService : TestRunsService
12- ) { }
9+ constructor ( private prismaService : PrismaService , private testRunsService : TestRunsService ) { }
1310
1411 async findMany ( projectId : string ) : Promise < Build [ ] > {
1512 return this . prismaService . build . findMany ( {
1613 where : { projectId } ,
17- orderBy : { createdAt : 'desc' }
14+ include : {
15+ testRuns : true ,
16+ } ,
17+ orderBy : { createdAt : 'desc' } ,
1818 } ) ;
1919 }
2020
@@ -35,14 +35,12 @@ export class BuildsService {
3535 const build = await this . prismaService . build . findOne ( {
3636 where : { id } ,
3737 include : {
38- testRuns : true
39- }
38+ testRuns : true ,
39+ } ,
4040 } ) ;
4141
4242 try {
43- await Promise . all (
44- build . testRuns . map ( ( testRun ) => this . testRunsService . delete ( testRun . id ) )
45- ) ;
43+ await Promise . all ( build . testRuns . map ( testRun => this . testRunsService . delete ( testRun . id ) ) ) ;
4644 } catch ( err ) {
4745 console . log ( err ) ;
4846 }
You can’t perform that action at this time.
0 commit comments