Fix details page query

This commit is contained in:
Zoe Roux 2025-10-26 22:31:24 +01:00
parent fb74ed30f8
commit ebad8f32a4
No known key found for this signature in database

View File

@ -25,9 +25,11 @@ import {
import { WatchListInfo } from "~/components/items/watchlist-info"; import { WatchListInfo } from "~/components/items/watchlist-info";
import { Rating } from "~/components/rating"; import { Rating } from "~/components/rating";
import { import {
Collection,
type Genre, type Genre,
type KImage, type KImage,
Show, Movie,
Serie,
type Studio, type Studio,
type WatchStatusV, type WatchStatusV,
} from "~/models"; } from "~/models";
@ -827,8 +829,8 @@ export const Header = ({
Header.query = ( Header.query = (
kind: "serie" | "movie" | "collection", kind: "serie" | "movie" | "collection",
slug: string, slug: string,
): QueryIdentifier<Show> => ({ ): QueryIdentifier<Serie | Movie | Collection> => ({
parser: Show, parser: kind === "serie" ? Serie : kind === "movie" ? Movie : Collection,
path: ["api", `${kind}s`, slug], path: ["api", `${kind}s`, slug],
params: { params: {
with: ["studios", ...(kind === "serie" ? ["firstEntry", "nextEntry"] : [])], with: ["studios", ...(kind === "serie" ? ["firstEntry", "nextEntry"] : [])],