simplify structure by remove (rezepte)
This commit is contained in:
13
src/routes/rezepte/+page.server.ts
Normal file
13
src/routes/rezepte/+page.server.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { PageServerLoad } from "./$types";
|
||||
|
||||
export async function load({ fetch }) {
|
||||
let current_month = new Date().getMonth() + 1
|
||||
const res_season = await fetch(`/api/rezepte/items/in_season/` + current_month);
|
||||
const res_all_brief = await fetch(`/api/rezepte/items/all_brief`);
|
||||
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,
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user