loki-q8ogjj/endpoints/vans.get.py
2025-03-28 11:44:50 -05:00

13 lines
356 B
Python

from fastapi import APIRouter, Depends, status
from typing import List
from helpers.car_helpers import get_german_cars
router = APIRouter()
@router.get("/vans", status_code=200, response_model=List[CarSchema])
async def get_german_cars(
db: Session = Depends(get_db)
):
"""Get list of German cars"""
cars = get_german_cars(db)
return cars