refactor: resolve hotel name directly from HOTEL_NAME env
resolveHotelName() now returns env.HOTEL_NAME directly — the single source of truth. The CMS hotel_name site setting and its DEFAULTS entry are removed as dead code since they no longer influence the displayed name. Call sites are unchanged (still await resolveHotelName()); only the lookup behind it is gone, so the public site always shows the configured env name with no DB round-trip and no preset.
This commit is contained in:
1 parent
164a4f4ef6
commit
750fcb2e5c
4 files changed
+6
-17
No files matched your search
@@ -5,7 +5,6 @@ import { logger } from "@/lib/logger";
|
||||
import { redis } from "@/lib/redis";
|
||||
|
||||
const DEFAULTS: Record<string, string> = {
|
||||
hotel_name: "",
|
||||
habbo_imaging_url: "/imaging",
|
||||
logo_url: "",
|
||||
nitro_client_url: "",
|
||||
@@ -15,7 +14,7 @@ const DEFAULTS: Record<string, string> = {
|
||||
const CACHE_TTL_MS = 300_000;
|
||||
const REDIS_CACHE_KEY = "site_settings";
|
||||
// Short in-process window so repeated getters in one request (header, nav,
|
||||
// footer all read hotel_name / logo) don't each pay a Redis round-trip.
|
||||
// footer all read logo and other settings) don't each pay a Redis round-trip.
|
||||
// Redis stays the source of truth across instances.
|
||||
const MEMORY_TTL_MS = 60_000;
|
||||
|
||||
|
||||
Reference in new issue
Block a user