Two fixes: 1. _parse_text_decklist(): replace fragile startswith() section header detection with proper case-insensitive regex so [Commander], [Main], [Deck] etc. are always recognised regardless of capitalisation. 2. add_deck_card endpoint: when a card is added with is_commander=1, also update the deck-level commander_name and commander_scryfall_id fields so the portrait and top-bar label stay in sync without requiring a full reload.
8 lines
278 B
Python
8 lines
278 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Commander AI Lab — FastAPI Backend v3
|
|
═════════════════════════════════════
|
|
|
|
v3 adds:
|
|
POST /api/lab/import/url — Import deck from Archidekt/EDHREC URL
|
|
POST /api/la |