lnbits-legend/lnbits/extensions/hivemind/views.py

16 lines
518 B
Python
Raw Normal View History

2021-10-28 11:55:22 +02:00
from fastapi.param_functions import Depends
from starlette.requests import Request
from starlette.responses import HTMLResponse
from lnbits.core.models import User
from lnbits.decorators import check_user_exists
from . import hivemind_ext, hivemind_renderer
@hivemind_ext.get("/", response_class=HTMLResponse)
async def index(request: Request, user: User = Depends(check_user_exists)):
2021-11-12 05:14:55 +01:00
return hivemind_renderer().TemplateResponse(
"hivemind/index.html", {"request": request, "user": user.dict()}
)