The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
simplify markDomainAsDeleted
Steven Teyea231a62ec64
diff --git a/apps/web/app/(ee)/api/cron/cleanup/route.ts b/apps/web/app/(ee)/api/cron/cleanup/route.tsindex 8d000631a3..2a70b748b0 100644--- a/apps/web/app/(ee)/api/cron/cleanup/route.ts+++ b/apps/web/app/(ee)/api/cron/cleanup/route.ts@@ -110,7 +110,6 @@ export async function GET(req: Request) {domains.map(({ slug }) =>markDomainAsDeleted({domain: slug,- workspaceId: E2E_WORKSPACE_ID,}),),);diff --git a/apps/web/app/(ee)/api/cron/domains/verify/utils.ts b/apps/web/app/(ee)/api/cron/domains/verify/utils.tsindex 871565ed9a..dfdfa2884e 100644--- a/apps/web/app/(ee)/api/cron/domains/verify/utils.ts+++ b/apps/web/app/(ee)/api/cron/domains/verify/utils.ts@@ -104,7 +104,6 @@ export const handleDomainUpdates = async ({return await Promise.allSettled([markDomainAsDeleted({domain,- workspaceId: workspace.id,}).then(async () => {// if the deleted domain was primary, make another domain primaryif (primary) {diff --git a/apps/web/app/api/domains/[domain]/route.ts b/apps/web/app/api/domains/[domain]/route.tsindex 820edc3252..a1eb46a22e 100644--- a/apps/web/app/api/domains/[domain]/route.ts+++ b/apps/web/app/api/domains/[domain]/route.ts@@ -184,7 +184,6 @@ export const DELETE = withWorkspace(await markDomainAsDeleted({domain,- workspaceId: workspace.id,});return NextResponse.json({ slug: domain });diff --git a/apps/web/lib/api/domains/claim-dot-link-domain.ts b/apps/web/lib/api/domains/claim-dot-link-domain.tsindex b5c718889d..c03bb2583e 100644--- a/apps/web/lib/api/domains/claim-dot-link-domain.ts+++ b/apps/web/lib/api/domains/claim-dot-link-domain.ts@@ -88,7 +88,6 @@ export async function claimDotLinkDomain({await markDomainAsDeleted({domain: slug,- workspaceId: projectId!,});}diff --git a/apps/web/lib/api/domains/mark-domain-deleted.ts b/apps/web/lib/api/domains/mark-domain-deleted.tsindex cca92d346d..39212a8fff 100644--- a/apps/web/lib/api/domains/mark-domain-deleted.ts+++ b/apps/web/lib/api/domains/mark-domain-deleted.ts@@ -4,13 +4,7 @@ import { removeDomainFromVercel } from "./remove-domain-vercel";// Mark the domain as deleted// We'll delete the domain and its links via a cron job-export async function markDomainAsDeleted({- domain,- workspaceId,-}: {- domain: string;- workspaceId: string;-}) {+export async function markDomainAsDeleted({ domain }: { domain: string }) {const response = await Promise.allSettled([removeDomainFromVercel(domain),@@ -33,7 +27,6 @@ export async function markDomainAsDeleted({console.error("markDomainAsDeleted", {reason: promise.reason,domain,- workspaceId,});}});diff --git a/apps/web/lib/api/workspaces.ts b/apps/web/lib/api/workspaces.tsindex c43e3737a9..b0ad074841 100644--- a/apps/web/lib/api/workspaces.ts+++ b/apps/web/lib/api/workspaces.ts@@ -120,7 +120,6 @@ export async function deleteWorkspaceAdmin(customDomains.map(({ slug }) =>markDomainAsDeleted({domain: slug,- workspaceId: workspace.id,}),),);