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.

unban-links script

Steven Teyd7291d7adaa2
diff --git a/apps/web/scripts/ban-links.ts b/apps/web/scripts/unban-links.ts
similarity index 78%
rename from apps/web/scripts/ban-links.ts
rename to apps/web/scripts/unban-links.ts
index 838d42a146..fa506316ec 100644
--- a/apps/web/scripts/ban-links.ts
+++ b/apps/web/scripts/unban-links.ts
@@ -1,18 +1,16 @@
import { prisma } from "@dub/prisma";
-import { LEGAL_USER_ID, LEGAL_WORKSPACE_ID } from "@dub/utils";
+import { LEGAL_WORKSPACE_ID } from "@dub/utils";
import "dotenv-flow/config";
import { linkCache } from "../lib/api/links/cache";
async function main() {
const links = await prisma.link.findMany({
where: {
- domain: "dub.sh",
+ projectId: LEGAL_WORKSPACE_ID,
url: {
- contains: "kurtdavisjr.com",
- },
- projectId: {
- not: LEGAL_WORKSPACE_ID,
+ contains: "xxxxxxx",
},
+ domain: "dub.sh",
},
select: {
id: true,
@@ -31,8 +29,8 @@ async function main() {
},
},
data: {
- projectId: LEGAL_WORKSPACE_ID,
- userId: LEGAL_USER_ID,
+ projectId: "xxx",
+ userId: "xxx",
},
});