summaryrefslogtreecommitdiff
path: root/src/routes/magicLink.ts
diff options
context:
space:
mode:
authorRaphael <mail@raphaelkabo.com>2025-05-28 18:58:46 +0100
committerGitHub <noreply@github.com>2025-05-28 18:58:46 +0100
commit3d84891118f8a81af3ddb978af9b3f8b02fd5d65 (patch)
tree0a8d344e331a0551b73435bbbb3919107737f69f /src/routes/magicLink.ts
parent6f0b7a44b995b6b66baf42a9369182fc05a90b34 (diff)
parent4664b6968fdcaca54268d60f400da02364213f05 (diff)
Merge branch 'main' into main
Diffstat (limited to 'src/routes/magicLink.ts')
-rw-r--r--src/routes/magicLink.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/routes/magicLink.ts b/src/routes/magicLink.ts
index e0a6310..1e0f87b 100644
--- a/src/routes/magicLink.ts
+++ b/src/routes/magicLink.ts
@@ -3,6 +3,7 @@ import { frontendConfig } from "../lib/config.js";
import { generateMagicLinkToken } from "../util/generator.js";
import MagicLink from "../models/MagicLink.js";
import { getConfigMiddleware } from "../lib/middleware.js";
+import i18next from "i18next";
const router = Router();
@@ -15,7 +16,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => {
...frontendConfig(res),
message: {
type: "danger",
- text: "Please provide an email address.",
+ text: i18next.t("routes.magiclink.provideemail"),
},
});
return;
@@ -30,7 +31,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => {
...frontendConfig(res),
message: {
type: "success",
- text: "Thanks! If this email address can create events, you should receive an email with a magic link.",
+ text: i18next.t("routes.magiclink.thanks"),
},
});
return;
@@ -49,7 +50,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => {
req.emailService.sendEmailFromTemplate({
to: email,
- subject: "Magic link to create an event",
+ subject: i18next.t("routes.magiclink.mailsubject"),
templateName: "createEventMagicLink",
templateData: {
token
@@ -59,7 +60,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => {
...frontendConfig(res),
message: {
type: "success",
- text: "Thanks! If this email address can create events, you should receive an email with a magic link.",
+ text: i18next.t("routes.magiclink.thanks"),
},
});
});