Fix client bundle pulling Redis/Prisma via habbo gamedata hotel.
Keep hotel list helpers client-safe; load CMS setting only from a server module. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import {
|
||||
DEFAULT_HABBO_GAMEDATA_HOTEL,
|
||||
HABBO_GAMEDATA_HOTEL_SETTING_KEY,
|
||||
type HabboGamedataHotel,
|
||||
normalizeHabboGamedataHotel,
|
||||
} from "@/lib/habbo-gamedata-hotel";
|
||||
import { siteSettings } from "@/lib/services/site-settings";
|
||||
|
||||
/** Read configured Habbo hotel TLD from CMS settings (server-only). */
|
||||
export async function getHabboGamedataHotel(): Promise<HabboGamedataHotel> {
|
||||
const raw = await siteSettings.get(
|
||||
HABBO_GAMEDATA_HOTEL_SETTING_KEY,
|
||||
DEFAULT_HABBO_GAMEDATA_HOTEL,
|
||||
);
|
||||
return normalizeHabboGamedataHotel(raw);
|
||||
}
|
||||
Reference in New Issue
Block a user