Files
FACULTATE-MESSENGER/messenger_app/api/v1/endpoints/messages.py
T

10 lines
287 B
Python

from fastapi import APIRouter
from messenger_app.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