0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
posthog/ee/urls.py
Michael Matloka 5d2ad6c7bb
chore(deps): Update black to 22.8.0 (#11596)
* chore(deps): Update `black` to `22.8.0`

* Format
2022-09-05 14:38:54 +02:00

45 lines
1.4 KiB
Python

from typing import Any, List
from django.urls.conf import path
from rest_framework_extensions.routers import NestedRegistryItem
from ee.api import integration
from posthog.api.routing import DefaultRouterPlusPlus
from .api import (
authentication,
dashboard_collaborator,
debug_ch_queries,
explicit_team_member,
hooks,
license,
subscription,
)
def extend_api_router(
root_router: DefaultRouterPlusPlus,
*,
projects_router: NestedRegistryItem,
project_dashboards_router: NestedRegistryItem,
) -> None:
root_router.register(r"license", license.LicenseViewSet)
root_router.register(r"debug_ch_queries", debug_ch_queries.DebugCHQueries, "debug_ch_queries")
root_router.register(r"integrations", integration.PublicIntegrationViewSet)
projects_router.register(r"hooks", hooks.HookViewSet, "project_hooks", ["team_id"])
projects_router.register(
r"explicit_members", explicit_team_member.ExplicitTeamMemberViewSet, "project_explicit_members", ["team_id"]
)
project_dashboards_router.register(
r"collaborators",
dashboard_collaborator.DashboardCollaboratorViewSet,
"project_dashboard_collaborators",
["team_id", "dashboard_id"],
)
projects_router.register(r"subscriptions", subscription.SubscriptionViewSet, "subscriptions", ["team_id"])
urlpatterns: List[Any] = [path("api/saml/metadata/", authentication.saml_metadata_view)]