feat: Update endpoint food
This commit is contained in:
parent
290f4f9b47
commit
c8761c7f3b
@ -5,12 +5,12 @@ from sqlalchemy.orm import Session
|
|||||||
from typing import List
|
from typing import List
|
||||||
from core.database import get_db
|
from core.database import get_db
|
||||||
from models.food import Food
|
from models.food import Food
|
||||||
from schemas.food import FoodSchema
|
from schemas.food import FoodCreate
|
||||||
from helpers.food_helpers import get_all_foods
|
from helpers.food_helpers import get_all_foods
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
@router.get("/food", status_code=200, response_model=List[FoodSchema])
|
@router.get("/food", status_code=200, response_model=List[FoodCreate])
|
||||||
async def get_food_list(
|
async def get_food_list(
|
||||||
db: Session = Depends(get_db)
|
db: Session = Depends(get_db)
|
||||||
):
|
):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user