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 links.ts

Steven Tey680d618bd115
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index e0cfed9ad8..7804a83f87 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -458,6 +458,17 @@ export async function addLink(link: LinkProps) {
nx: true,
},
),
+ link.projectId &&
+ prisma.project.update({
+ where: {
+ id: link.projectId,
+ },
+ data: {
+ linksUsage: {
+ increment: 1,
+ },
+ },
+ }),
]);
if (proxy && image) {