move API routes as cleanup

This commit is contained in:
2023-07-22 13:08:41 +02:00
parent 9c1002bc5e
commit 04827b1a39
36 changed files with 482 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
import { error } from "@sveltejs/kit";
export async function load({ fetch, params}) {
const res = await fetch(`/api/items/${params.name}`);
const res = await fetch(`/api/rezepte/items/${params.name}`);
let item = await res.json();
if(!res.ok){
throw error(res.status, item.message)