Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Apr 9, 2024
1 parent 665cc17 commit cd9fa97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/canyon-backend/src/coverage/coverage.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ export class CoverageController {
@Body() coverageClientDto: CoverageClientDto,
@Request() req: any,
): Promise<any> {
// console.log(req.ip);
// 添加特殊上报逻辑处 (这是标记,勿动!)
// {{$mpaasSpecial}}添加特殊上报逻辑处 (这是标记,勿动!)
return this.coverageClientService.invoke(req.user.id, coverageClientDto);
return this.coverageClientService.invoke(
req.user.id,
coverageClientDto,
req.ip,
);
}

@Get('api/coverage/summary/map')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class CoverageClientService {
private coverageLogModel: Model<CoverageLog>,
) {}

async invoke(currentUser, coverageClientDto: CoverageClientDto) {
async invoke(currentUser, coverageClientDto: CoverageClientDto, ip) {
if (coverageClientDto.projectID === '98620') {
return {};
}
Expand Down Expand Up @@ -113,6 +113,7 @@ export class CoverageClientService {
coverage: {
...cov,
coverage: 1,
ip,
},
});
pushQueue(cov);
Expand Down

0 comments on commit cd9fa97

Please sign in to comment.