13 lines
300 B
Python
13 lines
300 B
Python
from fastapi import APIRouter, Depends, HTTPException
|
|
|
|
router = APIRouter()
|
|
|
|
@router.post("/new-endpoint")
|
|
async def new_endpoint_handler(text: str):
|
|
"""Echo text parameter"""
|
|
return {
|
|
"message": "Text received successfully",
|
|
"data": {
|
|
"text": text
|
|
}
|
|
} |