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