This commit is contained in:
dni ⚡ 2024-10-16 11:06:43 +02:00
commit 9a1cc1b2cd
No known key found for this signature in database
GPG key ID: D1F416F29AD26E87
3 changed files with 379 additions and 346 deletions

View file

@ -3,7 +3,7 @@ from http import HTTPStatus
from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Request
from lnbits.core.crud import get_user
from lnbits.core.crud import get_user_by_id
from lnbits.core.models import WalletTypeInfo
from lnbits.decorators import require_admin_key, require_invoice_key
from lnurl.exceptions import InvalidUrl as LnurlInvalidUrl
@ -32,7 +32,7 @@ async def api_links(
wallet_ids = [key_info.wallet.id]
if all_wallets:
user = await get_user(key_info.wallet.user)
user = await get_user_by_id(key_info.wallet.user)
wallet_ids = user.wallet_ids if user else []
try: