-
Notifications
You must be signed in to change notification settings - Fork 114
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
Cannot have body parameter in controller defined in separate file #458
Comments
I added a test covering your code to make sure this ( |
Note that your title
does not match your posted reproduction code. To make sure this is addressed, please provide failing code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i am trying to define a controller in its own file with a body param like this:
but i get a runtime error when calling this endpoint.
looking into the reasons, i found this running compiled code:
this line runs into the error, because _context == {}
it looks like the controllers originating in a separate file are initialized with an empty context.
unfortunately i cant really figure out where this code originates, as my prime suspect router.ts does not seem to contain any code ending up in this line.
note that when i define this class in the same file as my App.ts i do not run into this issue (but of course for my complex controllers this is not an option).
what is even more confusing is that this has been working previously and i suspect a version problem.
my dependencies are:
my @deepkit/http is at 1.0.1-alpha.85 (i tried newer versions with the similar results).
The text was updated successfully, but these errors were encountered: