Fix jwt-token

This commit is contained in:
2025-09-10 06:13:47 +02:00
parent b0a700a6cf
commit 7877902698
6 changed files with 165 additions and 5 deletions

View File

@@ -230,6 +230,13 @@ TWILIO_PHONE_NUMBER=your_twilio_phone
PORT=3001
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000
# Debug Configuration
STORE_HEARTBEATS=true # Store heartbeat data for debugging
STORE_DRONE_TYPE0=true # Store drone_type 0 detections for debugging
LOG_ALL_DETECTIONS=true # Log all detection data to console
API_DEBUG=true # Enable API debug logging
STORE_RAW_PAYLOAD=true # Store complete raw payload from detectors
```
## API Documentation
@@ -281,6 +288,20 @@ Content-Type: application/json
- `POST /api/alerts/rules` - Create new alert rule
- `GET /api/alerts/logs` - Get alert history
### Debug Endpoints (Authentication Required)
- `GET /api/debug/config` - Get debug configuration status
- `GET /api/debug/detection-payloads` - Get recent detection payloads with raw data
- `GET /api/debug/heartbeat-payloads` - Get recent heartbeat payloads with raw data
- `GET /api/debug/debug-test` - Test debug endpoint
#### Debug Query Parameters
```http
GET /api/debug/detection-payloads?limit=50&offset=0&device_id=1941875381
GET /api/debug/heartbeat-payloads?limit=50&offset=0&device_id=1941875381
```
The debug endpoints return the complete raw payload received from detectors when `STORE_RAW_PAYLOAD=true` is enabled. This is useful for troubleshooting detector communication issues and understanding the exact data format being sent.
## Hardware Integration
### Expected Data Format