Skip to content
New issue

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

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

Already on GitHub? # to your account

Support for automatic class validation and CurrentUser check like routing-controllers #26

Open
gabekus opened this issue Oct 15, 2019 · 0 comments

Comments

@gabekus
Copy link

gabekus commented Oct 15, 2019

For class validation
See https://github.com/typestack/routing-controllers#auto-validating-action-params

Routing-controllers uses @Body(), but this library uses @MessageBody(), so enabling validation during the bootstrap initialization would inject this function into the @MessageBody() decorator.

For current user checker
See https://github.com/typestack/routing-controllers#currentuser-decorator
Many people attach a session on the request object, so we could implement our own current user check that would have access to the io/socket instance, and access request.session.user from that request instead of using @SocketRequest() to access user

EDIT: It seems there's already a PR open with support for CurrentUser checker, what's the status on this? #23

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

1 participant