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.

only send emails to actual users

Steven Tey8f8cc4f88e77
diff --git a/apps/web/app/api/cron/domains/verify/utils.ts b/apps/web/app/api/cron/domains/verify/utils.ts
index 548de7cbfa..7cfa8a4b63 100644
--- a/apps/web/app/api/cron/domains/verify/utils.ts
+++ b/apps/web/app/api/cron/domains/verify/utils.ts
@@ -58,6 +58,11 @@ export const handleDomainUpdates = async ({
},
},
},
+ where: {
+ user: {
+ isMachine: false,
+ },
+ },
},
},
});
diff --git a/apps/web/app/api/cron/usage/utils.ts b/apps/web/app/api/cron/usage/utils.ts
index 32b9849431..b13332f9c5 100644
--- a/apps/web/app/api/cron/usage/utils.ts
+++ b/apps/web/app/api/cron/usage/utils.ts
@@ -29,6 +29,11 @@ export const updateUsage = async () => {
select: {
user: true,
},
+ where: {
+ user: {
+ isMachine: false,
+ },
+ },
orderBy: {
createdAt: "asc",
},
diff --git a/apps/web/app/api/stripe/webhook/checkout-session-completed.ts b/apps/web/app/api/stripe/webhook/checkout-session-completed.ts
index 6e6cd65bf6..ca5725f4d3 100644
--- a/apps/web/app/api/stripe/webhook/checkout-session-completed.ts
+++ b/apps/web/app/api/stripe/webhook/checkout-session-completed.ts
@@ -68,6 +68,11 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
},
},
},
+ where: {
+ user: {
+ isMachine: false,
+ },
+ },
},
},
});
diff --git a/apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts b/apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts
index 27c4952a1d..c2126c763e 100644
--- a/apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts
+++ b/apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts
@@ -37,6 +37,11 @@ export async function customerSubscriptionDeleted(event: Stripe.Event) {
},
},
},
+ where: {
+ user: {
+ isMachine: false,
+ },
+ },
},
},
});
diff --git a/apps/web/app/api/stripe/webhook/invoice-payment-failed.tsx b/apps/web/app/api/stripe/webhook/invoice-payment-failed.tsx
index f7aa88a952..f191dd7061 100644
--- a/apps/web/app/api/stripe/webhook/invoice-payment-failed.tsx
+++ b/apps/web/app/api/stripe/webhook/invoice-payment-failed.tsx
@@ -35,6 +35,11 @@ export async function invoicePaymentFailed(event: Stripe.Event) {
},
},
},
+ where: {
+ user: {
+ isMachine: false,
+ },
+ },
},
},
});