Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

small fix

Kiran K0108e4be66d9
diff --git a/apps/web/app/api/zapier/send-webhook/route.ts b/apps/web/app/api/zapier/send-webhook/route.ts
index e9454a24f8..682b8b4cde 100644
--- a/apps/web/app/api/zapier/send-webhook/route.ts
+++ b/apps/web/app/api/zapier/send-webhook/route.ts
@@ -1,21 +1,12 @@
import { transformLink } from "@/lib/api/links";
-import { receiver } from "@/lib/cron";
+import { verifyQstashSignature } from "@/lib/cron/verify-qstash";
import { prisma } from "@/lib/prisma";
// POST /api/zapier/send-webhook - Send payload to Zapier hooks
export async function POST(req: Request) {
const body = await req.json();
- if (process.env.VERCEL === "1") {
- const isValid = await receiver.verify({
- signature: req.headers.get("Upstash-Signature") || "",
- body: JSON.stringify(body),
- });
-
- if (!isValid) {
- return new Response("Unauthorized", { status: 401 });
- }
- }
+ await verifyQstashSignature(req, body);
const { linkId } = body;