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.

small updates

Steven Teycc037f9f22ec
diff --git a/apps/web/app/api/user/route.ts b/apps/web/app/api/user/route.ts
index a7eff49db9..4c2a531d2d 100644
--- a/apps/web/app/api/user/route.ts
+++ b/apps/web/app/api/user/route.ts
@@ -106,7 +106,7 @@ export const PATCH = withSession(async ({ req, session }) => {
});
}
- const { success } = await ratelimit(1, "1 h").limit(
+ const { success } = await ratelimit(10, "1 d").limit(
`email-change-request:${session.user.id}`,
);
diff --git a/apps/web/app/app.dub.co/(auth)/auth/confirm-email-change/[token]/page.tsx b/apps/web/app/app.dub.co/(auth)/auth/confirm-email-change/[token]/page.tsx
index fc57fcc94e..9db733adeb 100644
--- a/apps/web/app/app.dub.co/(auth)/auth/confirm-email-change/[token]/page.tsx
+++ b/apps/web/app/app.dub.co/(auth)/auth/confirm-email-change/[token]/page.tsx
@@ -124,6 +124,7 @@ const VerifyEmailChange = async ({
subject: "Your email address has been changed",
email: data.email,
react: EmailUpdated({
+ oldEmail: data.email,
newEmail: data.newEmail,
}),
}),
diff --git a/packages/email/src/templates/email-updated.tsx b/packages/email/src/templates/email-updated.tsx
index 45c4d19a38..36b6879256 100644
--- a/packages/email/src/templates/email-updated.tsx
+++ b/packages/email/src/templates/email-updated.tsx
@@ -15,8 +15,10 @@ import {
import { Footer } from "../components/footer";
export function EmailUpdated({
+ oldEmail = "[email protected]",
newEmail = "[email protected]",
}: {
+ oldEmail: string;
newEmail: string;
}) {
return (
@@ -38,8 +40,8 @@ export function EmailUpdated({
Your email address has been changed
</Heading>
<Text className="mx-auto text-sm leading-6">
- The e-mail address for your Dub account has been changed to{" "}
- <strong>{newEmail}</strong>.
+ The e-mail address for your Dub account has been changed from{" "}
+ <strong>{oldEmail}</strong> to <strong>{newEmail}</strong>.
</Text>
<Text className="text-sm leading-6 text-black">
If you did not make this change, please contact our support team
@@ -52,7 +54,7 @@ export function EmailUpdated({
<Text className="text-sm leading-6 text-black">
This message is being sent to your old e-mail address only.
</Text>
- <Footer email={newEmail} />
+ <Footer email={oldEmail} />
</Container>
</Body>
</Tailwind>