fix: update to latest changes

This commit is contained in:
callebtc 2022-12-26 12:12:27 +01:00
parent feb61a3fa7
commit a243e4e320
2 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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"
)