caelum0x 0172a49cb7 fix: reject duplicate and unknown card IDs in deck creation
POST /players/me/decks only validated slot 0 (must be a hero); slots
1-7 were never checked against the card catalog at all, so a deck
could save the same card 8 times or a fabricated card ID. Add a
duplicate check and a real catalog lookup for the remaining slots.

Verified against a real local Postgres + Redis server (curl, not
mocks): duplicate -> 400 duplicate_card_in_deck, fake ID -> 400
unknown_card_in_deck, valid unique deck -> 200. 115 unit + 14
integration tests still green, tsc --noEmit clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-24 05:20:12 +03:00
..