From 9b77ef57285e97d6a51dd1988bde67317f4d7856 Mon Sep 17 00:00:00 2001 From: Varun Date: Thu, 6 Mar 2025 14:49:57 +0530 Subject: [PATCH] changes --- src/controllers/storeController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 );