initial structure implemented

docs -> _docs
This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-12-01 14:20:56 +02:00
parent 9134c5db06
commit abc26d5c20
360 changed files with 3881 additions and 101 deletions
+27
View File
@@ -0,0 +1,27 @@
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,
)