Update code in endpoints/yolo-post.post.py
This commit is contained in:
parent
c71557d0d0
commit
446d7ac9ba
@ -0,0 +1,14 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from core.database import fake_users_db
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.post("/yolo-post")
|
||||
async def yolo_post_handler(sentence: str):
|
||||
"""Echo a 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