Added the cashu router

This commit is contained in:
ben 2022-09-30 12:25:48 +01:00
parent 1e61a05e20
commit 45f2fffe90

View File

@ -6,20 +6,20 @@ from lnbits.db import Database
from lnbits.helpers import template_renderer
from lnbits.tasks import catch_everything_and_restart
from cashu.mint.router import router as cashu_router
db = Database("ext_cashu")
cashu_ext: APIRouter = APIRouter(prefix="/cashu", tags=["TPoS"])
cashu_ext: APIRouter = APIRouter(prefix="/cashu", tags=["cashu"])
cashu_ext.include_router(router=cashu_router)
def cashu_renderer():
return template_renderer(["lnbits/extensions/cashu/templates"])
from .tasks import wait_for_paid_invoices
from .views import * # noqa
from .views_api import * # noqa
def cashu_start():
loop = asyncio.get_event_loop()
loop.create_task(catch_everything_and_restart(wait_for_paid_invoices))