2018-02-25 12:05:29 +00:00
|
|
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
2018-06-10 09:29:24 +00:00
|
|
|
from django.conf.urls import url
|
2018-02-25 12:05:29 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2018-06-09 13:36:16 +00:00
|
|
|
application = ProtocolTypeRouter(
|
|
|
|
{
|
|
|
|
# Empty for now (http->django views is added by default)
|
2019-03-15 14:52:30 +00:00
|
|
|
"websocket": TokenAuthMiddleware(
|
|
|
|
URLRouter([url("^api/v1/activity$", consumers.InstanceActivityConsumer)])
|
2018-06-09 13:36:16 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
)
|