Fix jwt-token
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user