|
|
@ -2164,14 +2164,15 @@ exports.handleEstimation = async (req, reply) => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
await newOrder.save();
|
|
|
|
await newOrder.save();
|
|
|
|
|
|
|
|
const user = await User.findOne({ customerId });
|
|
|
|
return reply.code(200).send({
|
|
|
|
return reply.code(200).send({
|
|
|
|
message: "Order created successfully",
|
|
|
|
message: "Order created successfully",
|
|
|
|
orderId,
|
|
|
|
orderId,
|
|
|
|
customerId,
|
|
|
|
customerId,
|
|
|
|
estimatedTotal,
|
|
|
|
estimatedTotal,
|
|
|
|
items,
|
|
|
|
items,
|
|
|
|
status: "pending"
|
|
|
|
status: "pending",
|
|
|
|
|
|
|
|
userDetails: user || null
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|