restruct the apps
This commit is contained in:
parent
3864008341
commit
aa821ac468
13 changed files with 13 additions and 18 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -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"),
|
|
||||||
]
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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 = [
|
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"),
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue