mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 22:56:35 +00:00
abc26d5c20
docs -> _docs
17 lines
417 B
Python
17 lines
417 B
Python
from fastapi import APIRouter, Depends
|
|
from sse_starlette.sse import EventSourceResponse
|
|
|
|
from api.dependencies import get_flight_api
|
|
from components.flight_api import FlightAPIBase
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/{flight_id}")
|
|
async def stream_events(
|
|
flight_id: str,
|
|
api: FlightAPIBase = Depends(get_flight_api),
|
|
) -> EventSourceResponse:
|
|
return EventSourceResponse(api.stream_events(flight_id))
|
|
|