Update code in endpoints/vans.get.py
This commit is contained in:
parent
37aa13de98
commit
e18653a549
13
endpoints/vans.get.py
Normal file
13
endpoints/vans.get.py
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user