mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-25 15:10:41 +01:00
format
This commit is contained in:
parent
ad98cb0d45
commit
ee47575431
3 changed files with 15 additions and 10 deletions
|
@ -201,7 +201,10 @@ async def get_diagonalley_stalls(wallet_ids: Union[str, List[str]]) -> List[Stal
|
|||
)
|
||||
return [Stalls(**row) for row in rows]
|
||||
|
||||
async def get_diagonalley_stalls_by_ids(stall_ids: Union[str, List[str]]) -> List[Stalls]:
|
||||
|
||||
async def get_diagonalley_stalls_by_ids(
|
||||
stall_ids: Union[str, List[str]]
|
||||
) -> List[Stalls]:
|
||||
q = ",".join(["?"] * len(stall_ids))
|
||||
rows = await db.fetchall(
|
||||
f"SELECT * FROM diagonalley.stalls WHERE id IN ({q})", (*stall_ids,)
|
||||
|
|
|
@ -72,7 +72,9 @@ async def display(request: Request, market_id):
|
|||
|
||||
stalls = await get_diagonalley_market_stalls(market_id)
|
||||
stalls_ids = [stall.id for stall in stalls]
|
||||
products = [product.dict() for product in await get_diagonalley_products(stalls_ids)]
|
||||
products = [
|
||||
product.dict() for product in await get_diagonalley_products(stalls_ids)
|
||||
]
|
||||
|
||||
return diagonalley_renderer().TemplateResponse(
|
||||
"diagonalley/market.html",
|
||||
|
@ -80,6 +82,6 @@ async def display(request: Request, market_id):
|
|||
"request": request,
|
||||
"market": market,
|
||||
"stalls": [stall.dict() for stall in stalls],
|
||||
"products": products
|
||||
"products": products,
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue