Update code in endpoints/yolo-post.get.py

This commit is contained in:
Backend IM Bot 2025-03-13 22:20:41 +01:00
parent 8d522fa717
commit c71557d0d0

View File

@ -0,0 +1,13 @@
from fastapi import APIRouter, Depends, HTTPException
router = APIRouter()
@router.get("/yolo-post")
async def yolo_post_handler(sentence: str):
"""Echoes the given sentence backwards"""
reversed_sentence = sentence[::-1]
return {
"message": "Sentence reversed successfully",
"original_sentence": sentence,
"reversed_sentence": reversed_sentence
}