Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Use current user locale when sending email change request
Luke Vella39f71da700be
diff --git a/apps/web/src/trpc/routers/user.ts b/apps/web/src/trpc/routers/user.tsindex 47b9007ef..55710e288 100644--- a/apps/web/src/trpc/routers/user.ts+++ b/apps/web/src/trpc/routers/user.ts@@ -95,7 +95,7 @@ export const user = router({.mutation(async ({ input, ctx }) => {const currentUser = await prisma.user.findUnique({where: { id: ctx.user.id },- select: { email: true, id: true },+ select: { email: true, id: true, locale: true },});if (!currentUser) {@@ -128,7 +128,7 @@ export const user = router({},);- const emailClient = await getEmailClient();+ const emailClient = await getEmailClient(currentUser.locale ?? undefined);emailClient.sendTemplate("ChangeEmailRequest", {to: input.email,