cloudlfare
This commit is contained in:
@@ -89,7 +89,7 @@ export async function POST(req: Request) {
|
||||
// Send email via local sendmail (Postfix/Sendmail/Exim)
|
||||
await transporter.sendMail({
|
||||
from: 'William March <contact@williammarch.xyz>',
|
||||
to: 'your-real-inbox@example.com', // TODO: change to your inbox
|
||||
to: 'qemuguest@protonmail.com',
|
||||
replyTo: email,
|
||||
subject: `New message from ${name} via williammarch.xyz`,
|
||||
text: `From: ${name} <${email}>\n\n${message}`,
|
||||
|
||||
@@ -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