Add updateExisting option to furniture import
- 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:
1 parent
f89b8a6adf
commit
7ef5038a9e
3 files changed
+48
-15
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user