From c71557d0d01edfb2fa9b526ba302941f70e1af35 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Thu, 13 Mar 2025 22:20:41 +0100 Subject: [PATCH] Update code in endpoints/yolo-post.get.py --- endpoints/yolo-post.get.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 endpoints/yolo-post.get.py diff --git a/endpoints/yolo-post.get.py b/endpoints/yolo-post.get.py new file mode 100644 index 0000000..9868d52 --- /dev/null +++ b/endpoints/yolo-post.get.py @@ -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 + } \ No newline at end of file