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