cloudlfare
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user