tickets fastAPI fixes

This commit is contained in:
Tiago vasconcelos 2021-09-28 18:10:06 +01:00
parent ca5ee4ed4f
commit de4f7fd07a
2 changed files with 2 additions and 4 deletions

View file

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

View file

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