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 25, 2024
1 parent b57321e commit 0c89031
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export class JwtAuthGuard extends AuthGuard("jwt") {
super();
}
canActivate(context: ExecutionContext): any {
const request = context.switchToHttp().getRequest();
// 获取请求体
const requestBody = request.body;
if (Object.keys(requestBody).length === 0) {
return true;
}
return super.canActivate(context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class CollectController {
if (coverageClientDto.coverage) {
return this.coverageClientService.invoke({
...coverageClientDto,
reporter: String(req.user.id),
reporter: String(req?.user?.id || "canyon"),
});
}
let coverage = {};
Expand All @@ -71,7 +71,7 @@ export class CollectController {
return this.coverageClientService.invoke({
...coverageClientDto,
coverage,
reporter: String(req.user.id),
reporter: String(req?.user?.id || "canyon"),
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class CoverageMapClientService {
},
})
.catch(() => {
console.log("coverage create error");
// console.log("coverage create error");
});

/*
Expand Down

0 comments on commit 0c89031

Please sign in to comment.