Add files via upload

This commit is contained in:
Arc 2023-02-14 11:07:51 +00:00 committed by GitHub
commit aa13533791
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1988 additions and 0 deletions

17
views.py Normal file
View file

@ -0,0 +1,17 @@
from fastapi import Depends, Request
from fastapi.templating import Jinja2Templates
from starlette.responses import HTMLResponse
from lnbits.core.models import User
from lnbits.decorators import check_user_exists
from . import boltcards_ext, boltcards_renderer
templates = Jinja2Templates(directory="templates")
@boltcards_ext.get("/", response_class=HTMLResponse)
async def index(request: Request, user: User = Depends(check_user_exists)):
return boltcards_renderer().TemplateResponse(
"boltcards/index.html", {"request": request, "user": user.dict()}
)