From e18653a5497df81e3a413cd659cd305762c03a34 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 11:44:50 -0500 Subject: [PATCH] Update code in endpoints/vans.get.py --- endpoints/vans.get.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 endpoints/vans.get.py diff --git a/endpoints/vans.get.py b/endpoints/vans.get.py new file mode 100644 index 0000000..46d6219 --- /dev/null +++ b/endpoints/vans.get.py @@ -0,0 +1,13 @@ +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 \ No newline at end of file