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.

Update record-click.ts

Steven Tey953bcd23ba0e
diff --git a/apps/web/lib/tinybird/record-click.ts b/apps/web/lib/tinybird/record-click.ts
index d5ebf3a418..b963fa6d9d 100644
--- a/apps/web/lib/tinybird/record-click.ts
+++ b/apps/web/lib/tinybird/record-click.ts
@@ -6,7 +6,6 @@ import {
nanoid,
} from "@dub/utils";
import { EU_COUNTRY_CODES } from "@dub/utils/src/constants/countries";
-import { Link } from "@prisma/client";
import { ipAddress } from "@vercel/edge";
import { NextRequest, userAgent } from "next/server";
import {
@@ -154,9 +153,9 @@ export async function recordClick({
);
if (linkWebhooks.length > 0) {
- const link = (await conn
+ const link = await conn
.execute("SELECT * FROM Link WHERE id = ?", [linkId])
- .then((res) => res.rows[0])) as Link;
+ .then((res) => res.rows[0]);
await sendWebhooks({
trigger: "link.clicked",