Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
zhangtao25 committed Dec 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b57321e commit 0c89031
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
@@ -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 = {};
@@ -71,7 +71,7 @@ export class CollectController {
return this.coverageClientService.invoke({
...coverageClientDto,
coverage,
reporter: String(req.user.id),
reporter: String(req?.user?.id || "canyon"),
});
}

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

/*

0 comments on commit 0c89031

Please sign in to comment.