mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 22:56:36 +00:00
abc26d5c20
docs -> _docs
28 lines
747 B
Python
28 lines
747 B
Python
from typing import Annotated
|
|
from fastapi import APIRouter, Depends, UploadFile, File, Form
|
|
|
|
from models.api import BatchResponse
|
|
from api.dependencies import get_flight_api
|
|
from components.flight_api import FlightAPIBase
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.post("/{flight_id}/batches", response_model=BatchResponse)
|
|
async def upload_batch(
|
|
flight_id: str,
|
|
files: Annotated[list[UploadFile], File()],
|
|
start_sequence: Annotated[int, Form()],
|
|
end_sequence: Annotated[int, Form()],
|
|
batch_number: Annotated[int, Form()],
|
|
api: FlightAPIBase = Depends(get_flight_api),
|
|
) -> BatchResponse:
|
|
return await api.upload_batch(
|
|
flight_id,
|
|
files,
|
|
start_sequence,
|
|
end_sequence,
|
|
batch_number,
|
|
)
|
|
|