Skip to content
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

Implement route param injection #508

Closed
wants to merge 1 commit into from
Closed

Implement route param injection #508

wants to merge 1 commit into from

Conversation

OrkhanAlikhanov
Copy link

Quick implementation of #507
Make sure to run npm i realm-utils

getParameterNamesFromFunction from realm-utils is used to obtain kinda reflect method names from implementation.

  • Caching: requiredParams should be cached ideally somewhere in order to avoid getParameterNamesFromFunction more that once for an endpoint
  • Tests
  • Compatibility
  • Maybe check a boolean setting before doing that like injectMethodParams

Let me know what you guys are thinking.

@OrkhanAlikhanov
Copy link
Author

Since every endpoint is going to use @Method decorator, we can move getParameterNamesFromFunction call there and store result in the method itself

@LoicPoullain
Copy link
Member

Closing this based on comment here: #507 (comment)

Thank you for having given an example of what the implementation might look like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants