rd order show in admin
This commit is contained in:
parent
2d4550f566
commit
4e4aefb84c
@ -1670,6 +1670,7 @@ export const getAllOrdersforAdmin = async (req, res) => {
|
||||
// Fetch orders with population
|
||||
const orders = await RdOrder.find(filter)
|
||||
.populate({ path: "addedBy", select: "name email" }) // Populate retailer details
|
||||
.populate({path: "pd", select: "name email"}) // Populate PD details
|
||||
.sort({ createdAt: -1 })
|
||||
.skip(skip)
|
||||
.limit(limit);
|
||||
|
Loading…
Reference in New Issue
Block a user