Skip to content

Commit

Permalink
feat: GetProjectRecordDetailByShaService limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Feb 23, 2024
1 parent baf797f commit d66f22a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { Injectable } from '@nestjs/common';
import { PrismaService } from '../../prisma/prisma.service';
import { calculateCoverageOverviewByConditionFilter } from '../../utils/summary';
// import process from 'process';
import { getCommits } from '../../adapter/gitlab.adapter';
import { percent } from '../../utils/utils';
// import { getProjectByID } from '../adapter/gitlab.adapter';
@Injectable()
export class GetProjectRecordDetailByShaService {
constructor(private readonly prisma: PrismaService) {}
async invoke(projectID, sha): Promise<any> {
const current = 1;
const pageSize = 200;
const coverages = await this.prisma.coverage.findMany({
where: {
projectID,
sha,
covType: 'agg',
},
skip: (current - 1) * pageSize,
take: pageSize,
orderBy: {
createdAt: 'desc',
},
Expand Down

0 comments on commit d66f22a

Please sign in to comment.