have orders show on user page and invoice init

This commit is contained in:
Tiago vasconcelos
2022-08-18 16:18:07 +01:00
parent 4cd86d0daf
commit d6fe562067
5 changed files with 178 additions and 47 deletions
+3
View File
@@ -11,6 +11,7 @@ from lnbits.core.models import User
from lnbits.decorators import check_user_exists # type: ignore
from lnbits.extensions.diagonalley import diagonalley_ext, diagonalley_renderer
from ...core.crud import get_wallet
from .crud import (
get_diagonalley_products,
get_diagonalley_stall,
@@ -32,6 +33,7 @@ async def index(request: Request, user: User = Depends(check_user_exists)):
async def display(request: Request, stall_id):
stall = await get_diagonalley_stall(stall_id)
products = await get_diagonalley_products(stall_id)
wallet = await get_wallet(stall.wallet)
zones = []
for id in stall.shippingzones.split(","):
z = await get_diagonalley_zone(id)
@@ -55,6 +57,7 @@ async def display(request: Request, stall_id):
"request": request,
"stall": stall,
"products": [product.dict() for product in products],
"inkey": wallet.inkey
},
)