Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 26, 2024
1 parent 5d9fba5 commit 65d053c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/canyon-backend/src/cov/services/coverage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ import { HttpException, Injectable } from "@nestjs/common";
import { PrismaService } from "src/prisma/prisma.service";
import { CoverageSummaryDataMap } from "canyon-data";
import { decompressedData } from "../../utils/zstd";
import { removeNullKeys } from "../../utils/utils";

@Injectable()
export class CoverageService {
constructor(private readonly prisma: PrismaService) {}

async coverageSummaryMap(projectID, sha: string, reportID: string) {
const coverage = await this.prisma.coverage.findFirst({
where: {
sha,
projectID,
reportID: reportID,
where: removeNullKeys({
sha: sha || null,
projectID: projectID || null,
reportID: reportID || null,
covType: reportID ? "agg" : "all",
},
}),
});

if (coverage?.summary) {
Expand Down

0 comments on commit 65d053c

Please sign in to comment.