Controller function does only work if it's above other functions.
I have made a YouTube video on the behavior: https://youtu.be/1vLSRNCOXJY
10 messages · Page 1 of 1 (latest)
Controller function does only work if it's above other functions.
I have made a YouTube video on the behavior: https://youtu.be/1vLSRNCOXJY
because on line 27. you have @Get(':id'), the server will treat the toppers as a route param
^ order matters.
oh i see
oh i see, thanks!!!
toppers as a route param? could you explain more? is there docs where I can read more about this behavior?
oh yeah I got it! ryt! thanksss!
is it best practice to give the route parameters to the bottom?
this isn't about best practices. if you define your custom route that shares the same HTTP method below a route with a route parameter, the request won't reach it at all, as shown in your video
put some console logs in there, play around with it, pretty sure you'll get the point!