Skip to content

feat: implement guard support (#24) #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2025
Merged

feat: implement guard support (#24) #81

merged 2 commits into from
Apr 15, 2025

Conversation

Groupguanfang
Copy link
Owner

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 15, 2025 08:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

packages/adapter/adapter-nestjs/test/guard.test.ts:80

  • The test case for 'should use guard with filter' includes commented-out expectations for the filtered response. Consider uncommenting the expectation or adding a clear mechanism to verify the custom response to avoid false negatives.
// .expect({

@@ -24,7 +44,18 @@ export class EndingHandler {
ctx.response.end(await this._toSendableString(result.value))
}
else {
ctx.response.statusCode = 500
if (result.error instanceof HttpException) {
Copy link
Preview

Copilot AI Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After sending a response for the HttpException, the code continues to call ctx.response.end again. Add a return statement immediately after sending the response to prevent double sending.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@Groupguanfang Groupguanfang merged commit feaa9a2 into v1 Apr 15, 2025
9 checks passed
@Groupguanfang Groupguanfang changed the title docs(changeset): feat: implement guard support (#24) feat: implement guard support (#24) Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants