Skip to content

Commit

Permalink
fix passing user obj
Browse files Browse the repository at this point in the history
  • Loading branch information
talvasconcelos committed Oct 4, 2024
1 parent b97be0d commit dcb79bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions views.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from http import HTTPStatus

from fastapi import APIRouter, Depends, Request
from starlette.exceptions import HTTPException
from starlette.responses import HTMLResponse

from lnbits.core.models import User
from lnbits.decorators import check_user_exists
from lnbits.helpers import template_renderer
from starlette.exceptions import HTTPException
from starlette.responses import HTMLResponse

from .crud import get_pay_link

Expand All @@ -19,7 +20,7 @@ def lnurlp_renderer():
@lnurlp_generic_router.get("/", response_class=HTMLResponse)
async def index(request: Request, user: User = Depends(check_user_exists)):
return lnurlp_renderer().TemplateResponse(
"lnurlp/index.html", {"request": request, "user": user.json()}
"lnurlp/index.html", {"request": request, "user": user.dict()}
)


Expand Down

0 comments on commit dcb79bc

Please sign in to comment.