import { adminListVideos, getModels } from "$lib/services"; import { error } from "@sveltejs/kit"; export async function load({ params, fetch }) { const [allVideos, models] = await Promise.all([ adminListVideos(fetch).catch(() => []), getModels(fetch).catch(() => []), ]); const video = allVideos.find((v) => v.id === params.id); if (!video) throw error(404, "Video not found"); return { video, models }; }