Mongodb – Does Mongoose Update methods don't work without .then chaining?
I have the below code Product.findOneAndUpdate({ name: 'Cycling Jersey' }, { onSale: true }, { new: true }) .then(data => { console.log("IT WORKED!") console.log(data); }) .catch(err => { console.log("OH NO ERROR!") console.log(err) }) It updates the databse, and prints the…