Fix jwt-token
This commit is contained in:
@@ -5,6 +5,7 @@ const { validateRequest } = require('../middleware/validation');
|
||||
const { Heartbeat, Device, DroneDetection } = require('../models');
|
||||
const AlertService = require('../services/alertService');
|
||||
const DroneTrackingService = require('../services/droneTrackingService');
|
||||
const { getDroneTypeInfo, getDroneTypeName } = require('../utils/droneTypes');
|
||||
|
||||
// Initialize services
|
||||
const alertService = new AlertService();
|
||||
@@ -191,7 +192,11 @@ async function handleHeartbeat(req, res) {
|
||||
async function handleDetection(req, res) {
|
||||
const detectionData = req.body;
|
||||
|
||||
console.log(`🚁 Drone detection received from device ${detectionData.device_id}: drone_id=${detectionData.drone_id}, type=${detectionData.drone_type}, rssi=${detectionData.rssi}`);
|
||||
// Get drone type information
|
||||
const droneTypeInfo = getDroneTypeInfo(detectionData.drone_type);
|
||||
|
||||
console.log(`🚁 Drone detection received from device ${detectionData.device_id}: drone_id=${detectionData.drone_id}, type=${detectionData.drone_type} (${droneTypeInfo.name}), rssi=${detectionData.rssi}`);
|
||||
console.log(`🎯 Drone Type Details: ${droneTypeInfo.category} | Threat: ${droneTypeInfo.threat_level} | ${droneTypeInfo.description}`);
|
||||
console.log('🔍 Complete detection data:', JSON.stringify(detectionData, null, 2));
|
||||
|
||||
// Check if device exists and is approved
|
||||
|
||||
Reference in New Issue
Block a user