router.patch('/:productId', async (req, res, next) => { const id = req.params.productId; console.log(req.body) const product = await Product.findOneAndUpdate({ _id: id }, { $set: req.body }) })
I can see change into VSC console, but not in the postman.
You need to send back a response! you can do that using res.json({product}) if what you need is a json object back!
res.json({product})
2.1m questions
2.1m answers
60 comments
57.0k users