Closed ecrona closed 6 years ago
You should delegate business logic to services and simply call corresponding methods from within either gateway or controller. I don't think that combining gateway specific decorators and controller ones is a good idea, to be honest.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I'm submitting a...
Current behavior
I like NestJS & NestJS' websockets module, but I can't build what I want to build with how Gateway methods use it's arguments. A gateway method looks something like this
What I'm trying to do is to share endpoints between backend and frontend, so the arguments of the method in backend and frontend look the same, but the first argument in a websocket method is always client, is there a possible workaround for that?
It would be nicer to only have the parameter data as method arguments, such as when using normal controllers and their methods. Or maybe if the arguments could be switched.
Possibly that the client object could be obtained from the class instance, or by binding the function with client data.
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Maybe this is more of a question than a request, but I hope you understand my thoughts :)
Environment