Moxfield import

This commit is contained in:
2026-07-10 20:54:39 -05:00
parent f22df0e1d4
commit f18c0c6564
7 changed files with 416 additions and 61 deletions
+3
View File
@@ -39,6 +39,7 @@ async def deck_cards(slug: str):
"back_filename": c["back_filename"],
"back_exists": bool(c["back_filename"] and (OUTPUTS / slug / c["back_filename"]).exists()),
"scry_url": c["scry_url"],
"is_token": bool(c["is_token"]),
"fetch_status": c["fetch_status"],
"price_usd": c["price_usd"],
}
@@ -52,6 +53,8 @@ async def upload_image(slug: str, name: str = Form(...), file: UploadFile = File
deck = db.get_deck(slug)
if not deck:
raise HTTPException(404)
if deck["source"] == "moxfield":
raise HTTPException(409, "Moxfield-linked decks are updated by syncing, not manual edits")
name = name.strip()
if not name:
raise HTTPException(400, "name required")