The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update route.ts
Kiran K812596dd10d1
diff --git a/apps/web/app/api/resend/webhook/route.ts b/apps/web/app/api/resend/webhook/route.tsindex 7d28e22a27..1d39b97885 100644--- a/apps/web/app/api/resend/webhook/route.ts+++ b/apps/web/app/api/resend/webhook/route.ts@@ -22,12 +22,15 @@ export const POST = async (req: Request) => {// Need to base64 decode the secretconst secretBytes = Buffer.from(secret.split("_")[1], "base64");const computedSignature = crypto- .createHmac("sha256", new Uint8Array(secretBytes))+ .createHmac("sha256", secretBytes).update(signedContent).digest("base64");if (computedSignature !== svixSignature) {- return NextResponse.json({ message: "Invalid signature." }, { status: 400 });+ return NextResponse.json(+ { message: "Invalid signature." },+ { status: 400 },+ );}const { type, data } = JSON.parse(rawBody) || {};