Files
homepage/src/routes/rezepte/add/+page.ts
2023-06-24 15:35:37 +02:00

14 lines
434 B
TypeScript

import type { PageLoad } from "./$types";
export async function load({ fetch }) {
let current_month = new Date().getMonth() + 1
const res_season = await fetch(`/api/items/category`);
const res_all_brief = await fetch(`/api/items/tag`);
const item_season = await res_season.json();
const item_all_brief = await res_all_brief.json();
return {
season: item_season,
all_brief: item_all_brief,
};
};