2020-05-18 10:03:30 +00:00
|
|
|
from channels.auth import AuthMiddlewareStack
|
2018-02-25 12:05:29 +00:00
|
|
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
2020-05-18 10:03:30 +00:00
|
|
|
from django.conf.urls import url
|
2022-11-12 18:15:48 +00:00
|
|
|
from django.core.asgi import get_asgi_application
|
2022-11-23 11:11:36 +00:00
|
|
|
|
2018-03-01 20:51:20 +00:00
|
|
|
from funkwhale_api.instance import consumers
|
2018-02-25 12:05:29 +00:00
|
|
|
|
2018-06-09 13:36:16 +00:00
|
|
|
application = ProtocolTypeRouter(
|
|
|
|
{
|
|
|
|
# Empty for now (http->django views is added by default)
|
2020-05-18 10:03:30 +00:00
|
|
|
"websocket": AuthMiddlewareStack(
|
2021-07-24 11:48:52 +00:00
|
|
|
URLRouter(
|
|
|
|
[url("^api/v1/activity$", consumers.InstanceActivityConsumer.as_asgi())]
|
|
|
|
)
|
2022-11-12 18:15:48 +00:00
|
|
|
),
|
|
|
|
"http": get_asgi_application(),
|
2018-06-09 13:36:16 +00:00
|
|
|
}
|
|
|
|
)
|