🩹 Pass APIRouters directly
This commit is contained in:
parent
795dab71f0
commit
26a072714d
1 changed files with 3 additions and 3 deletions
|
|
@ -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]:
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue