diff --git a/server/routes/detections.js b/server/routes/detections.js index 396b802..4511627 100644 --- a/server/routes/detections.js +++ b/server/routes/detections.js @@ -11,9 +11,6 @@ const router = express.Router(); */ router.get('/', authenticateToken, async (req, res) => { try { - console.log('🔍 DETECTIONS ROUTE HIT - req.url:', req.originalUrl); - console.log('🔍 Query params:', req.query); - const { device_id, drone_id, @@ -47,13 +44,6 @@ router.get('/', authenticateToken, async (req, res) => { // Calculate offset for pagination const offset = (parseInt(page) - 1) * parseInt(limit); - console.log('🔍 About to query with whereClause:', whereClause); - console.log('🔍 Include config:', { - model: 'Device', - as: 'device', - attributes: ['id', 'name', 'geo_lat', 'geo_lon', 'location_description', 'is_approved'] - }); - // Query detections with device information const detections = await DroneDetection.findAll({ where: whereClause, @@ -64,8 +54,7 @@ router.get('/', authenticateToken, async (req, res) => { }], order: [[sort, order.toUpperCase()]], limit: parseInt(limit), - offset: offset, - logging: console.log // Enable SQL logging for this query + offset: offset }); // Get total count for pagination