Had to add a couple of tries
This commit is contained in:
parent
8e0baf7b2d
commit
429217f5a4
1 changed files with 13 additions and 6 deletions
|
|
@ -133,12 +133,19 @@ async def wallet(
|
||||||
return template_renderer().TemplateResponse(
|
return template_renderer().TemplateResponse(
|
||||||
"error.html", {"request": request, "err": "User does not exist."}
|
"error.html", {"request": request, "err": "User does not exist."}
|
||||||
)
|
)
|
||||||
if LNBITS_ALLOWED_USERS and user_id not in LNBITS_ALLOWED_USERS:
|
try:
|
||||||
return template_renderer().TemplateResponse(
|
if LNBITS_ALLOWED_USERS and user_id not in LNBITS_ALLOWED_USERS:
|
||||||
"error.html", {"request": request, "err": "User not authorized."}
|
return template_renderer().TemplateResponse(
|
||||||
)
|
"error.html", {"request": request, "err": "User not authorized."}
|
||||||
if LNBITS_ADMIN_USERS and user_id in LNBITS_ADMIN_USERS:
|
)
|
||||||
user.admin = True
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
if LNBITS_ADMIN_USERS and user_id in LNBITS_ADMIN_USERS:
|
||||||
|
user.admin = True
|
||||||
|
except:
|
||||||
|
pass
|
||||||
if not wallet_id:
|
if not wallet_id:
|
||||||
if user.wallets and not wallet_name: # type: ignore
|
if user.wallets and not wallet_name: # type: ignore
|
||||||
wallet = user.wallets[0] # type: ignore
|
wallet = user.wallets[0] # type: ignore
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue