add passenger telemetry

This commit is contained in:
2026-05-21 00:09:11 +03:00
parent 66c84ecdeb
commit e57fea321f
15 changed files with 1411 additions and 6 deletions

View File

@@ -36,6 +36,19 @@ class TelemetryController {
vehicle
});
const routeVehicles = await telemetryService.getRouteLiveVehicles(vehicle.route_id).catch((error) => {
logger.error('Failed to build realtime snapshot after official telemetry ingest:', error);
return null;
});
if (routeVehicles) {
broadcastToRoute(vehicle.route_id, {
type: 'snapshot:route',
routeId: vehicle.route_id,
vehicles: routeVehicles
});
}
return res.status(201).json({
message: 'Telemetry ingested successfully',
vehicle