Add files via upload

This commit is contained in:
Arc 2023-02-14 14:46:19 +00:00 committed by GitHub
commit ed083e4268
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 833 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 splitpayments_ext, splitpayments_renderer
templates = Jinja2Templates(directory="templates")
@splitpayments_ext.get("/", response_class=HTMLResponse)
async def index(request: Request, user: User = Depends(check_user_exists)):
return splitpayments_renderer().TemplateResponse(
"splitpayments/index.html", {"request": request, "user": user.dict()}
)