Update code in endpoints/yolo-post.post.py
This commit is contained in:
parent
446d7ac9ba
commit
3e7ae63ab5
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user