fixed admin check
This commit is contained in:
parent
7dc90177ec
commit
3a9dbb97c5
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ templates = Jinja2Templates(directory="templates")
|
||||||
@satspay_ext.get("/", response_class=HTMLResponse)
|
@satspay_ext.get("/", response_class=HTMLResponse)
|
||||||
async def index(request: Request, user: User = Depends(check_user_exists)):
|
async def index(request: Request, user: User = Depends(check_user_exists)):
|
||||||
admin = False
|
admin = False
|
||||||
if LNBITS_ADMIN_USERS and user.id not in LNBITS_ADMIN_USERS:
|
if LNBITS_ADMIN_USERS and user.id in LNBITS_ADMIN_USERS:
|
||||||
admin = True
|
admin = True
|
||||||
return satspay_renderer().TemplateResponse(
|
return satspay_renderer().TemplateResponse(
|
||||||
"satspay/index.html", {"request": request, "user": user.dict(), "admin": admin}
|
"satspay/index.html", {"request": request, "user": user.dict(), "admin": admin}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue