fix(api): API_BASE liest PUBLIC_WORDECK_API_URL statt PUBLIC_CARDS_API_URL
Some checks are pending
CI / validate (push) Waiting to run

Rebrand-Rest aus dem Cards-Cutover: client.ts las noch den alten
PUBLIC_CARDS_API_URL, die Production-Compose exportiert aber
PUBLIC_WORDECK_API_URL. Folge: das Web-Bundle fiel auf den
Dev-Default localhost:3081 zurück und alle API-Calls liefen ins
Leere (Deck-Liste, Marketplace).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-05-20 13:25:56 +02:00
parent 65091e3a12
commit fa5da8e937

View file

@ -17,7 +17,7 @@ import { env as publicEnv } from '$env/dynamic/public';
// vom Server gerenderten Init-Snapshot, daher gleicher Pfad für SSR
// und Client. Falls nichts gesetzt → localhost:3081 (Dev-Default).
export const API_BASE = (() => {
const fromPublic = publicEnv.PUBLIC_CARDS_API_URL;
const fromPublic = publicEnv.PUBLIC_WORDECK_API_URL;
if (fromPublic) return fromPublic;
if (typeof window !== 'undefined') return 'http://localhost:3081';
return process.env.WORDECK_API_URL ?? 'http://localhost:3081';