geofence model changes to include assignment property

This commit is contained in:
Shibi Chakkaravarthy
2026-06-16 06:07:29 +05:30
parent 3ae41a8cd5
commit 5e894627f5
3 changed files with 10 additions and 3 deletions
+4 -2
View File
@@ -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 });
}