refactor: centralize hotel name fallback via FALLBACK_HOTEL_NAME
Route all user-facing Atom hotel defaults through resolveHotelName (settings then HOTEL_NAME env then brand constant). Exclude Playwright e2e from tsconfig until deps are installed. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
6b2819aa20
commit
e00e9ca2dc
31 files changed
+113
-56
No files matched your search
@@ -3,8 +3,8 @@
|
||||
import { createHmac, timingSafeEqual } from "node:crypto";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { env } from "@/env";
|
||||
import { resolveHotelName } from "@/lib/hotel-name";
|
||||
import { sendMail } from "@/lib/services/email";
|
||||
import { siteSettings } from "@/lib/services/site-settings";
|
||||
|
||||
// Stateless email verification with a time-limited HMAC token.
|
||||
//
|
||||
@@ -78,8 +78,7 @@ export async function sendVerification(email: string): Promise<boolean> {
|
||||
const base = env.APP_URL.replace(/\/+$/, "");
|
||||
const link = `${base}/verify?token=${encodeURIComponent(token)}&email=${encodeURIComponent(normalised)}`;
|
||||
|
||||
const hotelName =
|
||||
(await siteSettings.get("hotel_name", env.HOTEL_NAME)) ?? env.HOTEL_NAME;
|
||||
const hotelName = await resolveHotelName();
|
||||
|
||||
let subject = `Verify your email · ${hotelName}`;
|
||||
let heading = "Verify your email";
|
||||
|
||||
Reference in new issue
Block a user