Harden catalog admin: fix translate/quick-add, RCON sync, and confirm UX.

Restore broken Quick Add search, correct Translate saves to items_base and FurnitureData, reparent page deletes, sync RCON on create/toggle/BC mutations, and replace native confirms/prompts with dialogs.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-17 21:12:58 +02:00
1 parent de9f837da1
commit b52e25578d
20 files changed
+557 -216

No files matched your search

+8 -11
View File
@@ -1,7 +1,7 @@
import { withAdmin } from "@/lib/api-handler";
import { apiOk } from "@/lib/api-response";
import { PERMS } from "@/lib/permissions";
import { lookupHabboIt } from "@/lib/services/habbo-furnidata-cache";
import { batchLookupByClassnames } from "@/lib/services/habbofurni";
export const GET = withAdmin(
{ permission: PERMS.CATALOG_VIEW },
@@ -13,19 +13,16 @@ export const GET = withAdmin(
.filter(Boolean)
.slice(0, 100);
const found = await batchLookupByClassnames(classnames);
const suggestions: Record<string, { name: string; description: string }> =
{};
await Promise.all(
classnames.map(async (classname) => {
const entry = await lookupHabboIt(classname);
if (!entry) return;
suggestions[classname] = {
name: entry.name ?? "",
description: entry.description ?? "",
};
}),
);
for (const [classname, entry] of found) {
suggestions[classname] = {
name: entry.name ?? "",
description: entry.description ?? "",
};
}
return apiOk({ suggestions });
},