The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
make dotsAppId optional
Steven Tey059ec27f5193
diff --git a/apps/web/lib/actions/deposit-funds.ts b/apps/web/lib/actions/deposit-funds.tsindex 7cbb3f3cb7..300fc7b268 100644--- a/apps/web/lib/actions/deposit-funds.ts+++ b/apps/web/lib/actions/deposit-funds.ts@@ -16,7 +16,7 @@ export const depositFundsAction = authActionClientconst { amount } = parsedInput;if (!workspace.dotsAppId) {- throw new Error("Dots app ID is not set for this workspace.");+ throw new Error("Partner payouts are not enabled for this workspace.");}return await depositFunds({diff --git a/apps/web/lib/actions/partners/accept-program-invite.ts b/apps/web/lib/actions/partners/accept-program-invite.tsindex 2b81826717..86842affc9 100644--- a/apps/web/lib/actions/partners/accept-program-invite.ts+++ b/apps/web/lib/actions/partners/accept-program-invite.ts@@ -51,17 +51,14 @@ export const acceptProgramInviteAction = authPartnerActionClientconst workspace = programEnrollment.program.workspace;- if (!workspace.dotsAppId) {- throw new Error("Workspace does not have a Dots app ID");- }-- const res = await Promise.all([- enrollDotsUserApp({- partner,- dotsAppId: workspace.dotsAppId,- programEnrollmentId: programEnrollment.id,- }),+ await Promise.all([backfillLinkData(programEnrollment.id),+ workspace.dotsAppId &&+ enrollDotsUserApp({+ partner,+ dotsAppId: workspace.dotsAppId,+ programEnrollmentId: programEnrollment.id,+ }),]);return {diff --git a/apps/web/lib/actions/partners/create-dots-transfer.ts b/apps/web/lib/actions/partners/create-dots-transfer.tsindex ea1225e1f8..e414dba98a 100644--- a/apps/web/lib/actions/partners/create-dots-transfer.ts+++ b/apps/web/lib/actions/partners/create-dots-transfer.ts@@ -18,7 +18,7 @@ export const createDotsTransferAction = authActionClientconst { payoutId } = parsedInput;if (!workspace.dotsAppId) {- throw new Error("Dots app not found for workspace");+ throw new Error("Partner payouts are not enabled for this workspace.");}const payout = await prisma.payout.findUniqueOrThrow({diff --git a/apps/web/lib/actions/refresh-compliance-flow.ts b/apps/web/lib/actions/refresh-compliance-flow.tsindex cca9243c2c..00d7f82efa 100644--- a/apps/web/lib/actions/refresh-compliance-flow.ts+++ b/apps/web/lib/actions/refresh-compliance-flow.ts@@ -14,7 +14,7 @@ export const refreshComplianceFlowAction = authActionClientconst { workspace } = ctx;if (!workspace.dotsAppId) {- throw new Error(`Dots app not found for workspace ${workspace.id}`);+ throw new Error("Partner payouts are not enabled for this workspace.");}const { link } = await refreshComplianceFlow({