Add live furnidata reload without hotel reload and notImported status filter
- Add /api/admin/import/furni?action=live-reconcile POST endpoint that reconciles FurnitureData.json with items_base without triggering RCON hotel reload - Add 'notImported' status filter in studio to show all non-imported furniture items - Useful for verifying imports and seeing what's missing after furniture import
This commit is contained in:
1 parent
7ad78db0ea
commit
652d331402
2 files changed
+13
No files matched your search
@@ -168,6 +168,17 @@ export const GET = withAdmin(
|
||||
return apiOk({ totalInDb, inCatalog, notInCatalog, missingNitro });
|
||||
}
|
||||
|
||||
// Live furnidata reconcile (without hotel RCON reload)
|
||||
if (action === "live-reconcile") {
|
||||
const furniReconcile = await reconcileFurniDataWithItemsBase();
|
||||
return apiOk({
|
||||
furniDataFixedIds: furniReconcile.fixedIds,
|
||||
furniDataFixedOfferIds: furniReconcile.fixedOfferIds,
|
||||
furniDataMissing: furniReconcile.missing,
|
||||
furniDataConflicts: furniReconcile.conflicts,
|
||||
});
|
||||
}
|
||||
|
||||
// Missing nitro endpoint: returns only imported items missing .nitro files
|
||||
if (action === "missing-nitro") {
|
||||
const pageNum = parseInt(
|
||||
|
||||
@@ -159,6 +159,8 @@ export function StudioClient({
|
||||
result = result.filter((i) => i.alreadyImported && i.nitroExists);
|
||||
else if (statusFilter === "missingNitro")
|
||||
result = result.filter((i) => i.alreadyImported && !i.nitroExists);
|
||||
else if (statusFilter === "notImported")
|
||||
result = result.filter((i) => !i.alreadyImported);
|
||||
}
|
||||
const sorted = [...result];
|
||||
if (sortBy === "name") sorted.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
Reference in new issue
Block a user