merged fusion fixes

This commit is contained in:
Tiago vasconcelos 2021-09-29 10:44:41 +01:00
parent 20c44cd0a0
commit 0e1a21f431
2 changed files with 1 additions and 8 deletions

View file

@ -1,10 +1,7 @@
<<<<<<< HEAD
=======
from fastapi.param_functions import Depends
from starlette.exceptions import HTTPException
from starlette.responses import HTMLResponse
from lnbits.core.models import User
>>>>>>> f827d2ce181d97368161d46ab8de2e9f061b9872
from lnbits.core.crud import get_wallet
from lnbits.decorators import check_user_exists
from http import HTTPStatus
@ -20,7 +17,7 @@ templates = Jinja2Templates(directory="templates")
@lnticket_ext.get("/", response_class=HTMLResponse)
# not needed as we automatically get the user with the given ID
# If no user with this ID is found, an error is raised
# @validate_uuids(["usr"], required=True)
# @validate_uuids(["usr"], required=True)
# @check_user_exists()
async def index(request: Request, user: User = Depends(check_user_exists)):
return lnticket_renderer().TemplateResponse("lnticket/index.html", {"request": request,"user": user.dict()})

View file

@ -37,11 +37,7 @@ from .crud import (
async def api_forms_get(r: Request, all_wallets: bool = Query(False), wallet: WalletTypeInfo = Depends(get_key_type)):
wallet_ids = [wallet.wallet.id]
<<<<<<< HEAD
if "all_wallets" in r.path_parameters:
=======
if all_wallets:
>>>>>>> f827d2ce181d97368161d46ab8de2e9f061b9872
wallet_ids = (await get_user(wallet.wallet.user)).wallet_ids
return [form.dict() for form in await get_forms(wallet_ids)]