Add GET endpoint for /asian
This commit is contained in:
parent
4d160fc6f9
commit
5d1ac634ac
12
endpoints/asian.get.py
Normal file
12
endpoints/asian.get.py
Normal file
@ -0,0 +1,12 @@
|
||||
from typing import List
|
||||
from fastapi import APIRouter, status
|
||||
|
||||
from schemas.car import CarSchema
|
||||
from helpers.car_helpers import get_asian_cars
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/asian", status_code=200, response_model=List[CarSchema])
|
||||
async def get_asian_cars_list():
|
||||
asian_cars = get_asian_cars()
|
||||
return asian_cars
|
Loading…
x
Reference in New Issue
Block a user