|
|
|
@ -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
|
|
|
|
|
);
|
|
|
|
|