mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(fix) /routes endpoint
This commit is contained in:
parent
90eb50ddd3
commit
901fe6b40d
1 changed files with 6 additions and 4 deletions
|
@ -3836,10 +3836,12 @@ async def get_routes():
|
||||||
routes = []
|
routes = []
|
||||||
for route in app.routes:
|
for route in app.routes:
|
||||||
route_info = {
|
route_info = {
|
||||||
"path": route.path,
|
"path": getattr(route, "path", None),
|
||||||
"methods": route.methods,
|
"methods": getattr(route, "methods", None),
|
||||||
"name": route.name,
|
"name": getattr(route, "name", None),
|
||||||
"endpoint": route.endpoint.__name__ if route.endpoint else None,
|
"endpoint": getattr(route, "endpoint", None).__name__
|
||||||
|
if getattr(route, "endpoint", None)
|
||||||
|
else None,
|
||||||
}
|
}
|
||||||
routes.append(route_info)
|
routes.append(route_info)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue