Update code in endpoints/yolo-post.get.py
This commit is contained in:
parent
8d522fa717
commit
c71557d0d0
13
endpoints/yolo-post.get.py
Normal file
13
endpoints/yolo-post.get.py
Normal 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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user