mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 22:58:46 +01:00
* explicitly exclude all extensions from mypy * fix example extension mypy * fix subdomains extension mypy + 1 type error fixed * fix mypy discordbot * mypy check copilot extensnion * copilot black * add invoices ext to ignore * add boltz and boltcard * copilit id is necessary * was discordbot is ok Co-authored-by: dni <dni.khr@gmail.com>
17 lines
530 B
Python
17 lines
530 B
Python
from fastapi import Request
|
|
from fastapi.params import Depends
|
|
from starlette.responses import HTMLResponse
|
|
|
|
from lnbits.core.models import User
|
|
from lnbits.decorators import check_user_exists
|
|
|
|
from . import discordbot_ext, discordbot_renderer
|
|
|
|
|
|
@discordbot_ext.get("/", response_class=HTMLResponse)
|
|
async def index(
|
|
request: Request, user: User = Depends(check_user_exists) # type: ignore
|
|
):
|
|
return discordbot_renderer().TemplateResponse(
|
|
"discordbot/index.html", {"request": request, "user": user.dict()}
|
|
)
|