api: add Person and StreamingService contexts
This commit is contained in:
@@ -41,14 +41,13 @@ export async function getSeason(
|
||||
showId: number,
|
||||
seasonNumber: number
|
||||
): Promise<Season | null> {
|
||||
// WICHTIG: trailing Slash entfernt
|
||||
const url = `${SEASON_BASE_URL}/${showId}/seasons/${seasonNumber}`;
|
||||
try {
|
||||
console.log("[getSeason] Fetch:", url);
|
||||
const res = await fetch(url);
|
||||
console.log("[getSeason] Status:", res.status);
|
||||
if (res.status === 404) return null;
|
||||
if (!res.ok) throw new Error(`Season fetch failed: ${res.status}`);
|
||||
if (!res.ok) throw new Error("Season fetch failed " + res.status);
|
||||
const raw: RawSeason = await res.json();
|
||||
const participants: SeasonParticipant[] = raw.seasonParticipants.map(
|
||||
(p) => ({
|
||||
|
||||
Reference in New Issue
Block a user