-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
autohooks break prefixOverride #380
Comments
cc @climba03003 wdyt? |
It is a complicated problem, I think we should
|
@jean-michelet wdyt? |
I am gonna investigate, but climba probably knows the component better than I do so if I struggle to fix this issue I will push a revert PR as suggested. |
Thanks @jean-michelet |
I will do it tomorrow or Friday at the latest, sent you a DM on Discord @mcollina |
https://github.com/rommelandrea/fastify-autoload-bug/blob/a2720e87a4c5d6fbfc6029868989774e525d1da8/routes/example/autohooks.js#L7 To reverse #368, I also need to reverse #374, if I understand correctly. Can you confirm before I push @climba03003? At the moment, it's difficult to solve this issue... We should state in the documentation that |
This test breaks when I revert: fastify-autoload/test/issues/374/test.js Line 37 in 24e352a
|
@jean-michelet |
Prerequisites
Fastify version
4.27.0
Plugin version
5.8.1+
Node.js version
20.12.2
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Linux
Description
From autoload 5.8.1 onward, if an autohook is defined and there is an override of the prefix defined in either hooks or route, the override will be ignored.
Link to code that reproduces the bug
https://github.com/rommelandrea/fastify-autoload-bug
Expected Behavior
when prefixOverride is exported the route change the prefix instead of use the default.
The text was updated successfully, but these errors were encountered: