Add multi-hotel Habbo gamedata locale in CMS settings.
Local Build and Deploy / deploy (push) Failing after 33s

Furni name suggestions, import enrichment, and badge texts now follow habbo_gamedata_hotel instead of hardcoded habbo.it.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-17 22:28:18 +02:00
1 parent 7bc0845932
commit d1baaf798a
15 files changed
+275 -65

No files matched your search

+7 -1
View File
@@ -1,11 +1,13 @@
import { withAdmin } from "@/lib/api-handler";
import { apiOk } from "@/lib/api-response";
import { getHabboGamedataHotel } from "@/lib/habbo-gamedata-hotel";
import { PERMS } from "@/lib/permissions";
import { batchLookupByClassnames } from "@/lib/services/habbofurni";
export const GET = withAdmin(
{ permission: PERMS.CATALOG_VIEW },
async (request) => {
const hotel = await getHabboGamedataHotel();
const raw = request.nextUrl.searchParams.get("classnames") || "";
const classnames = raw
.split(",")
@@ -13,6 +15,10 @@ export const GET = withAdmin(
.filter(Boolean)
.slice(0, 100);
if (classnames.length === 0) {
return apiOk({ hotel, suggestions: {} });
}
const found = await batchLookupByClassnames(classnames);
const suggestions: Record<string, { name: string; description: string }> =
{};
@@ -24,6 +30,6 @@ export const GET = withAdmin(
};
}
return apiOk({ suggestions });
return apiOk({ hotel, suggestions });
},
);