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
@@ -12,7 +12,7 @@ import { auth } from "@/lib/auth";
|
||||
import { LaravelEncrypter } from "@/lib/auth/laravel-encrypter";
|
||||
import { totpKeyUri } from "@/lib/auth/totp";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import { siteSettings } from "@/lib/services/site-settings";
|
||||
import { resolveHotelName } from "@/lib/hotel-name";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
@@ -52,7 +52,7 @@ export default async function TwoFactorPage({
|
||||
const hasAppKey = Boolean(env.APP_KEY);
|
||||
const enabled = Boolean(user?.twoFactorConfirmedAt);
|
||||
const pending = Boolean(user?.twoFactorSecret && !user?.twoFactorConfirmedAt);
|
||||
const hotelName = (await siteSettings.get("hotel_name", "Atom")) ?? "Atom";
|
||||
const hotelName = await resolveHotelName();
|
||||
|
||||
let secret = "";
|
||||
let uri = "";
|
||||
|
||||
Reference in new issue
Block a user