- FastAPI backend with JWT authentication - MySQL database with full schema - Docker Compose orchestration - CSV data import for 43,208 airports and 519,999 aircraft - Complete PPR management API - Modernized replacement for PHP-based system
22 lines
705 B
Python
22 lines
705 B
Python
from typing import List
|
|
from fastapi import APIRouter, Depends
|
|
from sqlalchemy.orm import Session
|
|
from app.api.deps import get_db
|
|
from app.crud.crud_ppr import ppr as crud_ppr
|
|
from app.schemas.ppr import PPR
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/arrivals", response_model=List[PPR])
|
|
async def get_public_arrivals(db: Session = Depends(get_db)):
|
|
"""Get today's arrivals for public display"""
|
|
arrivals = crud_ppr.get_arrivals_today(db)
|
|
return arrivals
|
|
|
|
|
|
@router.get("/departures", response_model=List[PPR])
|
|
async def get_public_departures(db: Session = Depends(get_db)):
|
|
"""Get today's departures for public display"""
|
|
departures = crud_ppr.get_departures_today(db)
|
|
return departures |