cleaner login and registration
This commit is contained in:
10
src/routes/rezepte/edit/[name]/+page.server.ts
Normal file
10
src/routes/rezepte/edit/[name]/+page.server.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export async function load({ fetch, params, locals}) {
|
||||
let current_month = new Date().getMonth() + 1
|
||||
const res = await fetch(`/api/items/${params.name}`);
|
||||
const recipe = await res.json();
|
||||
return {recipe: recipe,
|
||||
user: locals.user
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user