Files
FACULTATE-MESSENGER/messenger_app/api/v1/endpoints/messages.py
T
2024-01-09 03:06:03 +02:00

10 lines
273 B
Python

from fastapi import APIRouter
from api.v1.models.message import Message
router = APIRouter()
@router.post("/messages/", response_model=Message)
async def create_message(message: Message):
# You would typically save the message to the database here
return message