geofence model changes to include assignment property
This commit is contained in:
@@ -139,9 +139,11 @@ export const getAssignmentByIdHandler = async (req, res) => {
|
||||
},
|
||||
];
|
||||
|
||||
const assignment = await aggregateAssignment(pipeline)[0];
|
||||
const assignment = await aggregateAssignment(pipeline);
|
||||
|
||||
res.status(200).json({ result: assignment });
|
||||
console.log("ASSIGNMENT", assignment);
|
||||
|
||||
res.status(200).json({ result: assignment[0] });
|
||||
} catch (error) {
|
||||
res.status(500).json({ message: "Error getting assignment", error });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user