How To Deal With Nestjs @get() Decorator?
This block of code works properly. I'm able to access both functions with the URL http://localhost:3000/vehicle/availableVehicles & http://localhost:3000/vehicle/1 accordingly
Solution 1:
You just do exactly what you did in the first example, put the more specific routes above the ones that take route parameters.
When the server's routing table is being built on application startup they will be discovered and registered in this order.
This is a duplicate of https://stackoverflow.com/a/68727403/1364771
Post a Comment for "How To Deal With Nestjs @get() Decorator?"