Skip to content
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

Commented code #2

Open
tghelere opened this issue Feb 28, 2018 · 1 comment
Open

Commented code #2

tghelere opened this issue Feb 28, 2018 · 1 comment

Comments

@tghelere
Copy link

tghelere commented Feb 28, 2018

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants