mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-23 04:36:37 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user