diff --git a/endpoints/yolo-post.post.py b/endpoints/yolo-post.post.py index 54e4ed8..a67395e 100644 --- a/endpoints/yolo-post.post.py +++ b/endpoints/yolo-post.post.py @@ -4,9 +4,10 @@ from core.database import fake_users_db router = APIRouter() @router.post("/yolo-post") -async def yolo_post_handler(sentence: str): - """Echo a sentence backwards""" +async def yolo_post_handler(sentence: str = Body(...)): + """Echo sentence backwards""" reversed_sentence = sentence[::-1] + return { "message": "Sentence reversed successfully", "original_sentence": sentence,