chore: resend cleaning (#28)

This commit is contained in:
Riccardo Senica
2025-01-07 20:12:24 +01:00
committed by GitHub
parent a8de784981
commit 2616728128
3 changed files with 6 additions and 7 deletions

View File

@@ -14,11 +14,10 @@ import { NextRequest } from 'next/server';
export async function POST(request: NextRequest) {
try {
if (!process.env.RESEND_KEY) {
throw new Error('Resend variables not set');
}
const body = await request.json();
const validation = UnsubscribeFormSchema.safeParse(body);
if (!validation.success) {
return formatApiResponse(STATUS_BAD_REQUEST, BAD_REQUEST);
}