cloudlfare

This commit is contained in:
will
2026-04-02 23:29:59 +01:00
parent 746e51370d
commit c76f66c0fd
6 changed files with 154 additions and 16 deletions

View File

@@ -32,7 +32,10 @@ export async function GET(req: NextRequest) {
}
const md = await res.text();
const html = marked.parse(md || '');
// marked.parse can return string | Promise<string>,
// so we call it in async mode and await the result.
const html = await marked.parse(md || '', { async: true });
return new NextResponse(html, {
status: 200,