-
Notifications
You must be signed in to change notification settings - Fork 369
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
Full stack development #3
Comments
Lets fix this and add some description |
hi, I am in middle of the course. I am stuck at CURD operation using Schemas and Model (findById). Everything is working well when I am trying to get all the Products , but when Im trying to fecth one product the I am getting the output as "null" . |
Hi @su340 , exports.getProduct= async (req, res) => {
So, the overall effect of const id = +req.params.id; is to extract the id parameter from the request URL and convert it to a number, storing it in the variable id. This id can then be used in the Product.find method to query the database for a product with that specific ID. |
No description provided.
The text was updated successfully, but these errors were encountered: