i’m using expressjs and mongodb to update an order
const updateOrder = async (req, res) => {
const { id } = req.params;
await Order.updateOne({ _id: id }, req.body);
res.status(200).json({
message: "Order updated successfully",
});
};
is there a way to update multiple orders with the same value at the same time instead of using one id ?
New contributor
Jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1