feat: move all non-api routes to their own router

This unclutters the docs page a bit by making html routes collapsible.
This commit is contained in:
Stefan Stammberger
2021-08-23 21:17:46 +02:00
parent 0806ccfbbd
commit 6f38fdc39b
2 changed files with 18 additions and 13 deletions
+3 -1
View File
@@ -30,6 +30,7 @@ from .tasks import (
)
from .settings import WALLET
from .requestvars import g, request_global
from .core.views.generic import core_html_routes
import lnbits.settings
async def create_app(config_object="lnbits.settings") -> FastAPI:
@@ -106,8 +107,9 @@ def check_funding_source(app: FastAPI) -> None:
def register_routes(app: FastAPI) -> None:
"""Register Flask blueprints / LNbits extensions."""
"""Register FastAPI routes / LNbits extensions."""
app.include_router(core_app)
app.include_router(core_html_routes)
for ext in get_valid_extensions():
try: