From 3e7ae63ab5e215f262e41fe354e98462c4216095 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Thu, 13 Mar 2025 22:30:10 +0100 Subject: [PATCH] Update code in endpoints/yolo-post.post.py --- endpoints/yolo-post.post.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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,