2025-10-25 22:04:41 +02:00
|
|
|
import { getFeaturedModels, getFeaturedVideos } from "$lib/services";
|
|
|
|
|
export async function load({ fetch }) {
|
2025-10-28 23:41:40 +01:00
|
|
|
const [models, videos] = await Promise.all([
|
|
|
|
|
getFeaturedModels(3, fetch),
|
|
|
|
|
getFeaturedVideos(3, fetch),
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
// Ensure data is serializable by converting to plain JSON
|
2025-10-25 22:04:41 +02:00
|
|
|
return {
|
2025-10-28 23:41:40 +01:00
|
|
|
models: JSON.parse(JSON.stringify(models)),
|
|
|
|
|
videos: JSON.parse(JSON.stringify(videos)),
|
2025-10-25 22:04:41 +02:00
|
|
|
};
|
|
|
|
|
}
|