@ -17,16 +17,16 @@ module.exports.createProduct = async (req, res) => {
name,
price,
description,
inventory,
inventory
});
// Save the product to the database
await product.save();
res.status(201).json({ message: 'Product created successfully', product });
res.status(201).json(true);
} catch (error) {
console.error(error);
res.status(500).json({ message: 'Error creating product' });
res.status(500).json(false);
}
};