diff --git a/src/controllers/storeController.js b/src/controllers/storeController.js index a59932d8..93ca07a9 100644 --- a/src/controllers/storeController.js +++ b/src/controllers/storeController.js @@ -1947,7 +1947,7 @@ exports.getquotationofinstalleranduser = async (req, reply) => { exports.updateInstallationId = async (req, reply) => { try { - const { orderId } = req.params; + const { _id } = req.params; const { installationId } = req.body; if (!orderId || !installationId) { @@ -1956,7 +1956,7 @@ exports.updateInstallationId = async (req, reply) => { // Update the order with the new installationId const updatedOrder = await Order.findByIdAndUpdate( - orderId, + _id, { installationId, updated_at: new Date().toISOString() }, // Also update the timestamp { new: true } // Return the updated document );