Fix jwt-token

This commit is contained in:
2025-09-16 22:03:27 +02:00
parent 00819f10a6
commit 8ff2848695

View File

@@ -53,10 +53,12 @@ router.get('/', authenticateToken, async (req, res) => {
} = req.query; } = req.query;
// Build where clause for filtering // Build where clause for filtering
const whereClause = { const whereClause = {};
// Exclude drone type 0 (None) from normal detection queries
drone_type: { [Op.ne]: 0 } // Only exclude drone type 0 if no specific drone_type is requested
}; if (!drone_type) {
whereClause.drone_type = { [Op.ne]: 0 };
}
if (device_id) { if (device_id) {
whereClause.device_id = device_id; whereClause.device_id = device_id;