From 99638cc699d2d6788c2d308497e48110f8f25b1f Mon Sep 17 00:00:00 2001 From: Max Richter Date: Fri, 26 Apr 2024 19:12:34 +0200 Subject: [PATCH] fix: build erorr --- app/src/routes/runtime/{+server.ts => server.ts} | 4 ++++ 1 file changed, 4 insertions(+) rename app/src/routes/runtime/{+server.ts => server.ts} (90%) diff --git a/app/src/routes/runtime/+server.ts b/app/src/routes/runtime/server.ts similarity index 90% rename from app/src/routes/runtime/+server.ts rename to app/src/routes/runtime/server.ts index 67d9cbf..aee6d48 100644 --- a/app/src/routes/runtime/+server.ts +++ b/app/src/routes/runtime/server.ts @@ -14,6 +14,10 @@ export const POST: RequestHandler = async ({ request, fetch }) => { const { graph, settings } = await request.json(); + if (!graph || !settings) { + return new Response("Invalid request", { status: 400 }); + } + registry.fetch = fetch; await registry.load(graph.nodes.map(node => node.type))