replace python django backend with nodejs backend
This commit is contained in:
18
backend_old/ai/urls.py
Normal file
18
backend_old/ai/urls.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
from django.urls import path
|
||||
|
||||
from .views import AiConfigApiView, AiApiView, AiDiscordApiView, AiChatTextApiView
|
||||
from .websocket import DashboardConsumer
|
||||
|
||||
urlpatterns = [
|
||||
path('api/v1/ai/<name>/chat/text', AiChatTextApiView.as_view()),
|
||||
path('api/v1/ai/<name>/discord', AiDiscordApiView.as_view()),
|
||||
path('api/v1/ai/config', AiConfigApiView.as_view()),
|
||||
path('api/v1/ai', AiApiView.as_view()),
|
||||
]
|
||||
|
||||
application = ProtocolTypeRouter({
|
||||
'websocket': URLRouter([
|
||||
path('ws/dashboard/', DashboardConsumer.as_asgi()),
|
||||
])
|
||||
})
|
||||
Reference in New Issue
Block a user