Commented code
tghelere opened this issue · 1 comments
tghelere commented
Hey Max, how are you?
Very nice work! Thank you for sharing!
Well, i have a doubt.
It's about the commented code in the "GET" route of the product controller.
node-restful-api-tutorial / api / controllers / products.js (lines: 24 ~ 30)
File in this repo
As my English is somewhat limited, I did not understand everything you explained about while writing this part of the code.
What is the best option? Uncomment or delete commented lines?
kamboj652 commented
Max point was there that the return array it will be empty and it's not considered as an error. So, there is not any need to handle these kind of situation and we can leave it commented(demo how we can handle just in case) or delete.