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