chat/apps/chat/urls.py
2026-06-15 13:21:21 +03:30

16 lines
725 B
Python

from django.urls import path
from apps.chat.views.conversations import (
ConversationCreateView,
UserConversationListView,
)
from apps.chat.views.messages import MessageView
from apps.chat.views.read_state import ChatEventsView, ReadStateView
urlpatterns = [
path("api/chats/", ConversationCreateView.as_view(), name="chat-create"),
path("api/users/<uuid:user_id>/chats/", UserConversationListView.as_view(), name="user-chat-list"),
path("api/chats/<uuid:chat_id>/messages/", MessageView.as_view(), name="chat-messages"),
path("api/chats/<uuid:chat_id>/read/", ReadStateView.as_view(), name="chat-read"),
path("api/chats/<uuid:chat_id>/events/", ChatEventsView.as_view(), name="chat-events"),
]