feat: Card Kingdom prices, shopping cart export, and hover panel fixes (#73)

* feat: add CK prices, shopping cart export, and hover panel fixes

* fix: include commander in Buy This Deck cart export
This commit is contained in:
mwisnowski 2026-04-04 19:59:03 -07:00 committed by GitHub
parent dd996939e6
commit 69d84cc414
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 899 additions and 146 deletions

View file

@ -601,6 +601,13 @@ async def decks_pickups(request: Request, name: str) -> HTMLResponse:
except Exception:
pass
owned: set[str] = set()
try:
from ..services.build_utils import owned_set as _owned_set
owned = _owned_set()
except Exception:
pass
return templates.TemplateResponse(
"decks/pickups.html",
{
@ -612,6 +619,7 @@ async def decks_pickups(request: Request, name: str) -> HTMLResponse:
"error": error_msg,
"stale_prices": stale_prices,
"stale_prices_global": stale_prices_global,
"owned_names": owned,
},
)

View file

@ -68,9 +68,11 @@ async def get_card_price(
name = unquote(card_name).strip()
svc = get_price_service()
price = svc.get_price(name, region=region, foil=foil)
ck_price = svc.get_ck_price(name)
return JSONResponse({
"card_name": name,
"price": price,
"ck_price": ck_price,
"region": region,
"foil": foil,
"found": price is not None,