diff --git a/server/routes/detections.js b/server/routes/detections.js index d82f339..9411fa3 100644 --- a/server/routes/detections.js +++ b/server/routes/detections.js @@ -126,6 +126,14 @@ router.get('/', authenticateToken, async (req, res) => { }); console.log(`🔍 Detections query - found ${detections.length} detections for tenant ${tenant.slug}`); + console.log(`🔍 Detection data being returned:`, JSON.stringify(detections.map(d => ({ + id: d.id, + device_id: d.device_id, + drone_id: d.drone_id, + drone_type: d.drone_type, + server_timestamp: d.server_timestamp, + device: d.device ? { id: d.device.id, name: d.device.name } : null + })), null, 2)); // Get total count for pagination (also filtered by tenant) const totalCount = await DroneDetection.count({