Skip to content

Commit

Permalink
feat: add reimbursementProjectID
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Jan 14, 2025
1 parent 5056041 commit c15d796
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ async function decompressData(buffer) {
});
});
}
function reimbursementProjectID(projectID: string) {
if (!projectID.includes("-")) {
return `gitlab-${projectID}-auto`;
}
return projectID;
}
@Controller()
export class CollectController {
constructor(
Expand Down Expand Up @@ -55,6 +61,7 @@ export class CollectController {
return this.coverageClientService.invoke({
...coverageClientDto,
reporter: String(req?.user?.id || "canyon"),
projectID: reimbursementProjectID(coverageClientDto.projectID),
});
}
let coverage = {};
Expand All @@ -73,6 +80,7 @@ export class CollectController {
...coverageClientDto,
coverage,
reporter: String(req?.user?.id || "canyon"),
projectID: reimbursementProjectID(coverageClientDto.projectID),
});
}

Expand Down

0 comments on commit c15d796

Please sign in to comment.