Fix jwt-token

This commit is contained in:
2025-09-16 22:02:23 +02:00
parent 9857249668
commit 00819f10a6

View File

@@ -43,6 +43,7 @@ router.get('/', authenticateToken, async (req, res) => {
const {
device_id,
drone_id,
drone_type,
start_date,
end_date,
page = 1,
@@ -65,6 +66,10 @@ router.get('/', authenticateToken, async (req, res) => {
whereClause.drone_id = drone_id;
}
if (drone_type) {
whereClause.drone_type = parseInt(drone_type);
}
if (start_date) {
whereClause.server_timestamp = { ...whereClause.server_timestamp, [Op.gte]: new Date(start_date) };
}