diff --git a/lnbits/extensions/lnticket/__init__.py b/lnbits/extensions/lnticket/__init__.py index cfdadc40..c3b47fb0 100644 --- a/lnbits/extensions/lnticket/__init__.py +++ b/lnbits/extensions/lnticket/__init__.py @@ -1,12 +1,25 @@ -from quart import Blueprint +from fastapi import APIRouter, FastAPI +from fastapi.staticfiles import StaticFiles +from starlette.routing import Mount + from lnbits.db import Database +from lnbits.helpers import template_renderer db = Database("ext_lnticket") -lnticket_ext: Blueprint = Blueprint( - "lnticket", __name__, static_folder="static", template_folder="templates" +lnticket_ext: APIRouter = APIRouter( + prefix="/lnticket", + tags=["LNTicket"] + # "lnticket", __name__, static_folder="static", template_folder="templates" ) +def lnticket_renderer(): + return template_renderer( + [ + "lnbits/extensions/lnticket/templates", + ] + ) + from .views_api import * # noqa from .views import * # noqa