From 8ff2848695e91f17ef45af856300525b3f5ce99c Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Tue, 16 Sep 2025 22:03:27 +0200 Subject: [PATCH] Fix jwt-token --- server/routes/detections.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/routes/detections.js b/server/routes/detections.js index a3b9eab..a925a76 100644 --- a/server/routes/detections.js +++ b/server/routes/detections.js @@ -53,10 +53,12 @@ router.get('/', authenticateToken, async (req, res) => { } = req.query; // Build where clause for filtering - const whereClause = { - // Exclude drone type 0 (None) from normal detection queries - drone_type: { [Op.ne]: 0 } - }; + const whereClause = {}; + + // Only exclude drone type 0 if no specific drone_type is requested + if (!drone_type) { + whereClause.drone_type = { [Op.ne]: 0 }; + } if (device_id) { whereClause.device_id = device_id;