fix: PublicDeckOwner.pseudonym ist Bool, nicht String?

Beim Öffnen eines Marketplace-Decks crashed JSON-Decoder mit
typeMismatch (Expected String, found Bool) auf
owner.pseudonym.

Ursache: Server-Schema (cards/apps/api/src/db/schema/marketplace/
authors.ts) hat pseudonym als `boolean NOT NULL DEFAULT false` —
ein Flag, dass der Autor pseudonym auftritt (Anzeigename verbergen).
Native hatte das fälschlich als String? (Anzeige-Pseudonym) interpretiert.

Fix:
- PublicDeckOwner.pseudonym: String? → Bool
- decoder.decodeIfPresent(String.self) → decode(Bool.self) ?? false
- Test-Fixture: "pseudonym": null → "pseudonym": false

Build 3 → 4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-05-13 15:46:20 +02:00
parent b5edf5cf2e
commit f528ea448a
3 changed files with 10 additions and 6 deletions

View file

@ -31,7 +31,7 @@ struct MarketplaceDecodingTests {
"display_name": "mana-Kuratoren",
"verified_mana": true,
"verified_community": false,
"pseudonym": null
"pseudonym": false
}
}
""".data(using: .utf8)!