mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-25 23:35:14 +02:00
18 lines
430 B
TypeScript
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()};
|
|
};
|