Files
MediaManager-maxdorninger/web/src/routes/dashboard/+page.ts
2025-06-08 23:19:23 +02:00

18 lines
430 B
TypeScript

import {env} from '$env/dynamic/public';
import type {PageLoad} from './$types';
import {browser} from "$app/environment";
const apiUrl = env.PUBLIC_API_URL;
export const load: PageLoad = async ({fetch}) => {
const response = await fetch(apiUrl + '/tv/recommended', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
credentials: 'include'
});
return {tvRecommendations: await response.json()};
};