diff --git a/endpoints/names.post.py b/endpoints/names.post.py index 09d5cbf..9835b10 100644 --- a/endpoints/names.post.py +++ b/endpoints/names.post.py @@ -1,13 +1,14 @@ -from fastapi import APIRouter, Depends -from sqlalchemy.orm import Session -from typing import List -from core.database import get_db -from helpers.fruit_helpers import get_all_fruit_names +from fastapi import APIRouter +from fastapi.responses import JSONResponse +from helpers.fruit_helpers import get_all_fruits router = APIRouter() -@router.post("/names", status_code=200, response_model=List[str]) -async def get_fruit_names(db: Session = Depends(get_db)): - """Get all fruit names""" - names = get_all_fruit_names(db) - return names \ No newline at end of file +@router.post("/names") +async def update_route_description(): + """get all fruits with joy!""" + fruits = get_all_fruits() + return JSONResponse( + status_code=200, + content={"message": "Route description updated", "fruits": fruits} + ) \ No newline at end of file