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 Teycc7f057fb353
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index 87e01282d3..f9d44b5d64 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -25,6 +25,7 @@ import {
import { Prisma } from "@prisma/client";
import cloudinary from "cloudinary";
import { checkIfKeyExists, getRandomKey } from "../planetscale";
+import { R2 } from "../r2";
import { recordLink } from "../tinybird";
import {
LinkProps,
@@ -33,7 +34,6 @@ import {
RedisLinkProps,
} from "../types";
import z from "../zod";
-import { R2 } from "../r2";
const r2Client = new R2();
@@ -840,15 +840,12 @@ export async function deleteLink(linkId: string) {
},
});
return await Promise.all([
-<<<<<<< Updated upstream
-=======
prisma.link.delete({
where: {
id: link.id,
},
}),
r2Client.delete(`${link.domain}/${link.key}`),
->>>>>>> Stashed changes
redis.hdel(link.domain, link.key.toLowerCase()),
recordLink({ link, deleted: true }),
link.projectId &&