mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
96e4ee8512
* Nest endpoints under /project/ with StructuredViewSetMixin * Rewrite URLs * isort * Update utils.py * Fix errors * Fix almoast all the errors Last left to do: shared dashboards and permission classes. * isort * Adjust for master * Add compatbility with shared dashboards * Debug ClickHouse * Remove some # type: ignores * Simplify CursorPagination * Move test base from posthog.api.test to posthog.test * Improve API structure * Bring back legacy endpoints * Fix legacy compatibility * Fix bugs and typing * isort * Fix hooks test * Try fixing errors * Fix oversight * isort * Fix problems * isort * Be more tolerant * Fix naming and remove redundant code * Fix imports * Update deleteWithUndo * Roll back * Roll back more * Update .gitignore * Rollll back * Rollllllll * back * Betterify * Address feedback
11 lines
403 B
Python
11 lines
403 B
Python
from rest_framework_extensions.routers import NestedRegistryItem
|
|
|
|
from posthog.api.routing import DefaultRouterPlusPlus
|
|
|
|
from .api import hooks, license
|
|
|
|
|
|
def extend_api_router(root_router: DefaultRouterPlusPlus, *, projects_router: NestedRegistryItem):
|
|
root_router.register(r"license", license.LicenseViewSet)
|
|
projects_router.register(r"hooks", hooks.HookViewSet, "project_hooks", ["team_id"])
|