small change

This commit is contained in:
Sibunnayak 2024-09-24 17:37:06 +05:30
parent a6d632e663
commit 24018d4bdf

View File

@ -731,7 +731,8 @@ export const getCancelledOrdersAdmin = async (req, res) => {
.limit(limit) .limit(limit)
.populate({ path: "orderItem.productId" }) .populate({ path: "orderItem.productId" })
.populate({ path: "invoices" }) .populate({ path: "invoices" })
.populate({ path: "addedBy" }); .populate({ path: "addedBy" })
.sort({ createdAt: -1 });
if (cancelledOrders.length > 0) { if (cancelledOrders.length > 0) {
return res.status(200).json({ cancelledOrders, totalOrders }); return res.status(200).json({ cancelledOrders, totalOrders });