Add endpoint for getting flights structured by date

This commit is contained in:
april
2024-01-05 10:11:13 -06:00
parent 5b6b5d819b
commit 78a4ca2984
2 changed files with 34 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import datetime
from typing import Optional, Annotated, Any
from typing import Optional, Annotated, Any, Dict, Union, List, Literal
from bson import ObjectId
from pydantic import BaseModel, Field
@@ -102,3 +102,6 @@ class FlightConciseSchema(BaseModel):
time_total: PositiveFloat
comments: Optional[str] = None
FlightByDateSchema = Dict[int, Union[List['FlightByDateSchema'], FlightConciseSchema]]