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.

newReferralSale → newPartnerSale

Steven Teya2829338b912
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/notification-preferences/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/notification-preferences/route.ts
index 51598a2fdf..4534df78f1 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/notification-preferences/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/notification-preferences/route.ts
@@ -8,7 +8,7 @@ export const GET = withWorkspace(async ({ workspace, session }) => {
select: {
domainConfigurationUpdates: true,
linkUsageSummary: true,
- newReferralSale: true,
+ newPartnerSale: true,
},
where: {
projectUser: {
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/notifications/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/notifications/page-client.tsx
index 14d7e0d5e7..e23765bec4 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/notifications/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/notifications/page-client.tsx
@@ -35,7 +35,7 @@ export default function NotificationsSettingsPageClient() {
show: true,
},
{
- type: "newReferralSale",
+ type: "newPartnerSale",
icon: DollarSign,
title: "New referral sales",
description: "Alert when a new sale is made on your referral program.",
diff --git a/apps/web/lib/api/partners/notify-partner-sale.ts b/apps/web/lib/api/partners/notify-partner-sale.ts
index 9bb7fdca3c..4461248e74 100644
--- a/apps/web/lib/api/partners/notify-partner-sale.ts
+++ b/apps/web/lib/api/partners/notify-partner-sale.ts
@@ -63,7 +63,7 @@ export async function notifyPartnerSale({
where: {
projectId: workspace.id,
notificationPreference: {
- newReferralSale: true,
+ newPartnerSale: true,
},
},
include: {
diff --git a/apps/web/lib/zod/schemas/workspaces.ts b/apps/web/lib/zod/schemas/workspaces.ts
index 51de123ca8..ae12e64612 100644
--- a/apps/web/lib/zod/schemas/workspaces.ts
+++ b/apps/web/lib/zod/schemas/workspaces.ts
@@ -142,5 +142,5 @@ export const updateWorkspaceSchema = createWorkspaceSchema.partial().extend({
export const notificationTypes = z.enum([
"linkUsageSummary",
"domainConfigurationUpdates",
- "newReferralSale",
+ "newPartnerSale",
]);
diff --git a/packages/prisma/schema/workspace.prisma b/packages/prisma/schema/workspace.prisma
index 735dbf5b5c..75ec371df2 100644
--- a/packages/prisma/schema/workspace.prisma
+++ b/packages/prisma/schema/workspace.prisma
@@ -118,7 +118,7 @@ model NotificationPreference {
projectUserId String @unique
linkUsageSummary Boolean @default(true)
domainConfigurationUpdates Boolean @default(true)
- newReferralSale Boolean @default(true)
+ newPartnerSale Boolean @default(true)
projectUser ProjectUsers @relation(fields: [projectUserId], references: [id], onDelete: Cascade)
}