order paying works

This commit is contained in:
Tiago vasconcelos
2022-08-19 11:19:45 +01:00
parent e76c23b096
commit a5c6b1135c
5 changed files with 123 additions and 78 deletions
-4
View File
@@ -33,15 +33,12 @@ 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)
z = z.dict()
zones.append({"label": z["countries"], "cost": z["cost"], "value": z["id"]})
logger.debug(f"ZONES {zones}")
if not stall:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="Stall does not exist."
@@ -57,7 +54,6 @@ async def display(request: Request, stall_id):
"request": request,
"stall": stall,
"products": [product.dict() for product in products],
"inkey": wallet.inkey,
},
)