Add updateExisting option to furniture import
CI / check (push) Successful in 1m14s
CI / release (push) Skipped
CI / deploy (push) Successful in 2m15s

- Added updateExisting parameter to importSingleFurni and API routes
- When updateExisting=true, existing items are updated (catalog price/page) instead of failing
- Added catalogUpdated flag to ImportSingleResult
- Updates existing catalog entries (price, page) instead of skipping duplicates
This commit is contained in:
openhands committed 2026-08-14 18:35:00 +02:00
1 parent f89b8a6adf
commit 7ef5038a9e
3 files changed
+48 -15

No files matched your search

+3
View File
@@ -297,6 +297,7 @@ export const POST = withAdmin(
type: item.type ?? "flooritem",
revision: item.revision ?? 0,
category: item.category ?? "unknown",
updateExisting: body.updateExisting === true,
sourceSwfBaseUrl: source?.sourceSwfBaseUrl,
nitroBaseUrl: source?.nitroBaseUrl || undefined,
iconBaseUrl: source?.iconBaseUrl || undefined,
@@ -359,6 +360,7 @@ export const POST = withAdmin(
revision,
category,
sourceId,
updateExisting,
} = body;
if (!classname || !name) return apiError("Missing classname or name", 400);
@@ -374,6 +376,7 @@ export const POST = withAdmin(
type: type ?? "flooritem",
revision: revision ?? 0,
category: category ?? "unknown",
updateExisting: updateExisting === true,
sourceSwfBaseUrl: source?.sourceSwfBaseUrl,
nitroBaseUrl: source?.nitroBaseUrl || undefined,
iconBaseUrl: source?.iconBaseUrl || undefined,