2021-08-20 12:44:03 +01:00
|
|
|
from quart import render_template, g
|
|
|
|
|
|
|
|
from lnbits.decorators import check_user_exists, validate_uuids
|
|
|
|
from . import lndhub_ext
|
2021-08-21 01:55:07 +01:00
|
|
|
from fastapi import FastAPI, Request
|
|
|
|
from fastapi.templating import Jinja2Templates
|
2021-08-20 12:44:03 +01:00
|
|
|
|
2021-08-21 01:55:07 +01:00
|
|
|
templates = Jinja2Templates(directory="templates")
|
2021-08-20 12:44:03 +01:00
|
|
|
|
|
|
|
@lndhub_ext.route("/")
|
|
|
|
@validate_uuids(["usr"], required=True)
|
|
|
|
@check_user_exists()
|
2021-08-21 01:55:07 +01:00
|
|
|
async def lndhub_index(request: Request):
|
|
|
|
return await templates.TemplateResponse("lndhub/index.html", {"request": request,"user":g.user})
|