🩹 Pass APIRouters directly

This commit is contained in:
Brian Wiborg 2025-10-02 03:08:24 +02:00
parent 795dab71f0
commit 26a072714d
No known key found for this signature in database

View file

@ -346,10 +346,10 @@ class App:
""" """
Return an APIRouter with all loaded routes. Return an APIRouter with all loaded routes.
""" """
router = APIRouter() out = []
for r in self.routers: for r in self.routers:
router.include_router(r) out.extend(r.routes)
return router.routes return out
def dict(self) -> Dict[str, Any]: def dict(self) -> Dict[str, Any]:
""" """