fix: update not found handling in GET route to return 404 response

This commit is contained in:
Dries Augustyns
2026-05-04 14:09:19 +02:00
parent ba23a1c6fa
commit 7615b62945
+1 -2
View File
@@ -1,13 +1,12 @@
import {getLLMText} from '@/lib/get-llm-text';
import {source} from '@/lib/source';
import {notFound} from 'next/navigation';
export const revalidate = false;
export async function GET(_req: Request, props: {params: Promise<{slug?: string[]}>}) {
const params = await props.params;
const page = source.getPage(params.slug);
if (!page) notFound();
if (!page) return new Response('Not found', {status: 404});
return new Response(await getLLMText(page), {
headers: {