-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add a decorator to handle @MessageBody of NestJS gateways #557
Comments
I don't have insight about this subject. Can you explain me more detaily?
|
I'm referring to this: NestJS Gateway Considering that Nestia Core provides access to essential decorators for safeguarding and validating data within controller routes, could it also potentially introduce a new decorator dedicated to NestJS Gateways? Specifically, a decorator that replaces the existing @MessageBody()? @MessageBody The logic might resemble the TypedBody decorator, but adjusted to throw a WSException instead of the standard HTTP bad request error. Moreover, it would require utilizing something like context.switchToWs().getData() to retrieve and validate the client's message. |
A decorator for NestJS Gateways
I was about to pull the trigger to replace my entire validation with Nestia/Typia but didn't because I saw there was no gateway @MessageBody decorator replacement.
Would it be possible to add one ?
The text was updated successfully, but these errors were encountered: