From a243e4e32019daaa4011acd4d5edd797f6dcd5a0 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 26 Dec 2022 12:12:27 +0100 Subject: [PATCH] fix: update to latest changes --- lnbits/core/views/api.py | 6 +++--- lnbits/decorators.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 1d3d76f12..5f7cbd38a 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -665,9 +665,9 @@ async def img(request: Request, data): ) -@core_app.get("/api/v1/audit") -async def api_auditor(wallet: WalletTypeInfo = Depends(require_admin_user)): - +@core_app.get("/api/v1/audit", dependencies=[Depends(check_admin)]) +async def api_auditor(): + WALLET = get_wallet_class() total_balance = await get_total_balance() error_message, node_balance = await WALLET.status() diff --git a/lnbits/decorators.py b/lnbits/decorators.py index 7f8e84e6e..3ef9e850e 100644 --- a/lnbits/decorators.py +++ b/lnbits/decorators.py @@ -181,7 +181,7 @@ async def require_admin_user( token = api_key_header or api_key_query wallet = await get_key_type(r, token) - if wallet.wallet.user not in LNBITS_ADMIN_USERS: + if wallet.wallet.user not in settings.lnbits_admin_users: raise HTTPException( status_code=HTTPStatus.FORBIDDEN, detail="Not an admin user" )