13 lines
425 B
TypeScript
Raw Normal View History

2023-06-19 00:32:51 +02:00
import type { PageLoad } from "./$types";
2023-06-19 20:38:45 +02:00
export async function load({ fetch, params }) {
2023-07-22 13:08:41 +02:00
const res_season = await fetch(`/api/rezepte/items/in_season/` + params.month);
const res_all_brief = await fetch(`/api/rezepte/items/all_brief`);
2023-06-19 00:32:51 +02:00
const item_season = await res_season.json();
const item_all_brief = await res_all_brief.json();
return {
2023-06-19 20:38:45 +02:00
month: params.month,
2023-06-19 00:32:51 +02:00
season: item_season,
};
};