2018-02-25 12:05:29 +00:00
|
|
|
from django.conf.urls import url
|
|
|
|
|
|
|
|
from channels.auth import AuthMiddlewareStack
|
|
|
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
|
|
|
|
|
|
|
from funkwhale_api.common.auth import TokenAuthMiddleware
|
2018-03-01 20:51:20 +00:00
|
|
|
from funkwhale_api.instance import consumers
|
2018-02-25 12:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
application = ProtocolTypeRouter({
|
|
|
|
# Empty for now (http->django views is added by default)
|
|
|
|
"websocket": TokenAuthMiddleware(
|
|
|
|
URLRouter([
|
2018-03-01 20:51:20 +00:00
|
|
|
url("^api/v1/instance/activity$",
|
|
|
|
consumers.InstanceActivityConsumer),
|
2018-02-25 12:05:29 +00:00
|
|
|
])
|
|
|
|
),
|
|
|
|
})
|