Update api.py

This commit is contained in:
Arc 2022-02-14 11:31:42 +00:00 committed by GitHub
parent 8c923ad653
commit 155c32504a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ async def api_wallet(wallet: WalletTypeInfo = Depends(get_key_type)):
async def api_update_balance(
amount: int, wallet: WalletTypeInfo = Depends(get_key_type)
):
if LNBITS_ADMIN_USERS and wallet.wallet.user not in LNBITS_ADMIN_USERS:
if wallet.wallet.user not in LNBITS_ADMIN_USERS:
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN, detail="Not an admin user"
)