restruct the apps

This commit is contained in:
Ali Asadi 2026-06-15 13:21:21 +03:30
parent 3864008341
commit aa821ac468
13 changed files with 13 additions and 18 deletions

View file

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

View file

@ -1,5 +1,16 @@
from django.urls import path, include
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/", include("apps.chat.api.urls")),
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"),
]