backend/med_backend/web/api/echo/views.py

19 lines
388 B
Python

from fastapi import APIRouter
from med_backend.web.api.echo.schema import Message
router = APIRouter()
@router.post("/", response_model=Message)
async def send_echo_message(
incoming_message: Message,
) -> Message:
"""
Sends echo back to user.
:param incoming_message: incoming message.
:returns: message same as the incoming.
"""
return incoming_message