First almost fully functioning MVP.
Lacking: - Seasons cannot be added/edited - image upload - layout recipe/adding
This commit is contained in:
8
src/routes/rezepte/edit/[name]/+page.ts
Normal file
8
src/routes/rezepte/edit/[name]/+page.ts
Normal file
@ -0,0 +1,8 @@
|
||||
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};
|
||||
};
|
Reference in New Issue
Block a user