Files
homepage/src/routes/rezepte/edit/[name]/+page.ts
AlexBocken 3d0d3f41e2 First almost fully functioning MVP.
Lacking:
- Seasons cannot be added/edited
- image upload
- layout recipe/adding
2023-06-24 15:35:38 +02:00

9 lines
259 B
TypeScript

import type { PageLoad } from "./$types";
export async function load({ fetch, params}) {
let current_month = new Date().getMonth() + 1
const res = await fetch(`/api/items/${params.name}`);
const recipe = await res.json();
return {recipe};
};