fix: handle summary links and sanitization

This commit is contained in:
Riccardo
2024-09-20 11:39:50 +02:00
parent 9ecd3eebd3
commit ea1ea8bb5d
7 changed files with 303 additions and 14 deletions

View File

@@ -16,7 +16,7 @@ export const dynamic = 'force-dynamic'; // defaults to force-static
export async function POST(request: NextRequest) {
try {
if (!process.env.RESEND_KEY || !process.env.RESEND_AUDIENCE) {
throw new Error('RESEND_AUDIENCE is not set');
throw new Error('Resend variables not set');
}
const body = await request.json();
const validation = ConfirmationSchema.safeParse(body);