Operational Endpoints for Admin, Products, Assignments, Location, Vendor, Venue completed. Geofence Testing PEnding
This commit is contained in:
@@ -17,7 +17,16 @@ export const getProductByQuery = async (query) => {
|
||||
|
||||
// Read (Get all)
|
||||
export const getAllProducts = async () => {
|
||||
return await Model.find();
|
||||
return await Model.aggregate([
|
||||
{
|
||||
$lookup: {
|
||||
from: "vendors",
|
||||
localField: "vendors",
|
||||
foreignField: "_id",
|
||||
as: "vendors"
|
||||
}
|
||||
}
|
||||
]);
|
||||
};
|
||||
|
||||
// Update
|
||||
|
||||
Reference in New Issue
Block a user