diff --git a/controllers/productControllers.js b/controllers/productControllers.js index bcda3e1..a4a6567 100644 --- a/controllers/productControllers.js +++ b/controllers/productControllers.js @@ -103,13 +103,13 @@ exports.updateProduct = async (req, res) => { }, { new: true }); if (!product) { - return res.status(404).json({ message: 'Product not found' }); + return res.status(404).json(false); } - res.json({ message: 'Product updated successfully', product }); + res.json(true); } catch (error) { console.error(error); - res.status(500).json({ message: 'Error updating product' }); + res.status(500).json(false); } };