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.

remove email

Pedro Ladeira7f432fe14bdb
diff --git a/apps/web/app/(ee)/api/cron/partners/merge-accounts/route.ts b/apps/web/app/(ee)/api/cron/partners/merge-accounts/route.ts
index 8ec1540007..0ff389e192 100644
--- a/apps/web/app/(ee)/api/cron/partners/merge-accounts/route.ts
+++ b/apps/web/app/(ee)/api/cron/partners/merge-accounts/route.ts
@@ -9,8 +9,7 @@ import { conn } from "@/lib/planetscale";
import { storage } from "@/lib/storage";
import { recordLink } from "@/lib/tinybird";
import { redis } from "@/lib/upstash";
-import { sendBatchEmail, sendEmail } from "@dub/email";
-import PartnerAccountMergeFailed from "@dub/email/templates/partner-account-merge-failed";
+import { sendBatchEmail } from "@dub/email";
import PartnerAccountMerged from "@dub/email/templates/partner-account-merged";
import { prisma } from "@dub/prisma";
import { FraudRuleType, Prisma, ProgramEnrollment } from "@dub/prisma/client";
@@ -557,21 +556,6 @@ export async function POST(req: Request) {
mention: true,
});
- if (targetEmail) {
- try {
- await sendEmail({
- variant: "notifications",
- to: targetEmail,
- subject: "We couldn't merge your Dub partner accounts",
- react: PartnerAccountMergeFailed({ email: targetEmail }),
- });
- } catch (emailError) {
- console.error(
- `Error sending merge failure email: ${emailError.message}`,
- );
- }
- }
-
return handleAndReturnErrorResponse(error);
}
}
diff --git a/packages/email/src/templates/partner-account-merge-failed.tsx b/packages/email/src/templates/partner-account-merge-failed.tsx
deleted file mode 100644
index ce3eca452b..0000000000
--- a/packages/email/src/templates/partner-account-merge-failed.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import { DUB_WORDMARK } from "@dub/utils";
-import {
- Body,
- Container,
- Head,
- Heading,
- Html,
- Img,
- Link,
- Preview,
- Section,
- Tailwind,
- Text,
-} from "@react-email/components";
-import { Footer } from "../components/footer";
-
-export default function PartnerAccountMergeFailed({
- email = "[email protected]",
-}: {
- email: string;
-}) {
- return (
- <Html>
- <Head />
- <Preview>We couldn't merge your Dub partner accounts</Preview>
- <Tailwind>
- <Body className="mx-auto my-auto bg-white font-sans">
- <Container className="mx-auto my-10 max-w-[600px] px-10 py-5">
- <Section className="mb-8 flex items-center">
- <Img
- src={DUB_WORDMARK}
- height="32"
- alt="Dub"
- className="mr-auto"
- />
- </Section>
-
- <Heading className="p-0 text-xl font-semibold text-black">
- We couldn't merge your partner accounts
- </Heading>
-
- <Text className="text-base text-neutral-600">
- We ran into an issue while merging your Dub partner accounts and
- the merge could not be completed. Please do not try again on your
- own — contact support and we'll help you resolve this.
- </Text>
-
- <Text className="text-base text-neutral-600">
- <Link href="https://dub.co/support">Contact support</Link>
- </Text>
-
- <Footer email={email} />
- </Container>
- </Body>
- </Tailwind>
- </Html>
- );
-}