The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix the signature
Kiran Kd0f54a37f231
diff --git a/apps/web/lib/webhook/publish.ts b/apps/web/lib/webhook/publish.tsindex 16cf545544..65088890f1 100644--- a/apps/web/lib/webhook/publish.ts+++ b/apps/web/lib/webhook/publish.ts@@ -4,7 +4,7 @@ import { Webhook } from "@prisma/client";import { WebhookTrigger } from "../types";import { clickEventSchemaTB } from "../zod/schemas/clicks";import { LinkSchema } from "../zod/schemas/links";-import { createWebhookSignature } from "./signature";+import { createWebhookSignature } from "./utils";interface SendToWebhookArgs {webhookUrl?: string;diff --git a/apps/web/lib/webhook/signature.ts b/apps/web/lib/webhook/utils.tssimilarity index 87%rename from apps/web/lib/webhook/signature.tsrename to apps/web/lib/webhook/utils.tsindex 3668f97a16..ec72c68f59 100644--- a/apps/web/lib/webhook/signature.ts+++ b/apps/web/lib/webhook/utils.ts@@ -1,5 +1,6 @@import crypto from "crypto";+// Create a signature for a webhook requestexport const createWebhookSignature = (secret: string, rawBody: any) => {if (!secret) {throw new Error("A secret must be provided to create a webhook signature.");