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.

queue partner cleanup when Stripe Connect is missing

Pedro Ladeiraaf200e5ae6f0
diff --git a/apps/web/lib/tapfiliate/update-stripe-customers.ts b/apps/web/lib/tapfiliate/update-stripe-customers.ts
index dca4328478..315f9639e9 100644
--- a/apps/web/lib/tapfiliate/update-stripe-customers.ts
+++ b/apps/web/lib/tapfiliate/update-stripe-customers.ts
@@ -34,8 +34,13 @@ export async function updateStripeCustomers(payload: TapfiliateImportPayload) {
if (!workspace.stripeConnectId) {
console.error(
- `Workspace ${workspace.id} has no stripeConnectId. Skipping...`,
+ `Workspace ${workspace.id} has no stripeConnectId. Skipping Stripe customer matching...`,
);
+
+ await tapfiliateImporter.queue({
+ ...payload,
+ action: "cleanup-partners",
+ });
return;
}
diff --git a/apps/web/lib/tolt/update-stripe-customers.ts b/apps/web/lib/tolt/update-stripe-customers.ts
index e2d239ea77..8e553ee3d0 100644
--- a/apps/web/lib/tolt/update-stripe-customers.ts
+++ b/apps/web/lib/tolt/update-stripe-customers.ts
@@ -34,8 +34,13 @@ export async function updateStripeCustomers(payload: ToltImportPayload) {
if (!workspace.stripeConnectId) {
console.error(
- `Workspace ${workspace.id} has no stripeConnectId. Skipping...`,
+ `Workspace ${workspace.id} has no stripeConnectId. Skipping Stripe customer matching...`,
);
+
+ await toltImporter.queue({
+ ...payload,
+ action: "cleanup-partners",
+ });
return;
}