Skip to content

fix(#1238): bun adapter add qi to routes that need query from guard #1263

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lolotronop
Copy link
Contributor

fixes #1238
src/adapter/bun/compose.ts didn't account for routes that have a guard that requires query, thus leading to a bug. This PR adds a straightforward check for it, bypassing sucrose calls
While this works, I think(?) that it would be better to handle route validators (including standalone validators) inside sucrose if I understand the purpose of this function right, but as of now I can't think of a way to do it properly
Would love to hear SaltyAoms thought on it. Also there is a test included for this specific case

Copy link

pkg-pr-new bot commented Jun 21, 2025

Open in StackBlitz

npm i https://pkg.pr.new/elysiajs/elysia@1263

commit: 7251612

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.

Error if guard validates query but route does not acces c.query property
1 participant