mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-25 11:14:02 +02:00
tickets fastAPI fixes
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
from quart import g, abort, render_template
|
||||
|
||||
from lnbits.core.crud import get_wallet
|
||||
from lnbits.decorators import check_user_exists, validate_uuids
|
||||
from http import HTTPStatus
|
||||
@@ -7,6 +5,7 @@ from http import HTTPStatus
|
||||
from . import lnticket_ext, lnticket_renderer
|
||||
from .crud import get_form
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.params import Depends
|
||||
from fastapi.templating import Jinja2Templates
|
||||
|
||||
templates = Jinja2Templates(directory="templates")
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import re
|
||||
from quart import g, jsonify, request
|
||||
from http import HTTPStatus
|
||||
|
||||
from fastapi import FastAPI, Query
|
||||
@@ -38,7 +37,7 @@ from .crud import (
|
||||
async def api_forms(r: Request, wallet: WalletTypeInfo = Depends(get_key_type)):
|
||||
wallet_ids = [wallet.wallet.id]
|
||||
|
||||
if "all_wallets" in r.args:
|
||||
if "all_wallets" in r.path_parameters:
|
||||
wallet_ids = (await get_user(wallet.wallet.user)).wallet_ids
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user