Initial commit
This commit is contained in:
11
src/routes/rezepte/[name]/+page.server.ts
Normal file
11
src/routes/rezepte/[name]/+page.server.ts
Normal file
@ -0,0 +1,11 @@
|
||||
// import { error } from '@sveltejs/kit';
|
||||
import type { PageLoad } from "./$types";
|
||||
//import { Recipe } from '../../../models/Recipe';
|
||||
//import { dbConnect, dbDisconnect } from '../../../utils/db';
|
||||
|
||||
export async function load({ fetch, params }) {
|
||||
const res = await fetch(`/api/items/${params.name}`);
|
||||
const item = await res.json();
|
||||
|
||||
return item;
|
||||
};
|
Reference in New Issue
Block a user