Skip to content

Commit 74e365d

Browse files
committed
chore: minor change on product import debugs
1 parent c8ef595 commit 74e365d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

functions/lib/integration/import-product.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,17 @@ module.exports = ({ appSdk, storeId, auth }, blingToken, blingStore, blingDeposi
196196
if (variationId) {
197197
resourceAndId += `/variations/${variationId}`
198198
}
199-
console.log(`#${storeId} ${resourceAndId}`, { quantity, inventory, sku })
200199
if (Object.keys(inventory).length) {
201200
if ((quantity > 0 && !inventoryQnt) || Object.keys(inventory).length === 1) {
202201
inventory = {}
203202
}
204203
const endpoint = `${resourceAndId}.json`
205204
const body = { inventory, quantity }
205+
console.log(`#${storeId} ${endpoint}`, { quantity, inventory, sku })
206206
return appSdk.apiRequest(storeId, endpoint, 'PATCH', body, auth)
207207
}
208208
const endpoint = `${resourceAndId}/quantity.json`
209+
console.log(`#${storeId} ${endpoint}`, { quantity, sku })
209210
return appSdk.apiRequest(storeId, endpoint, 'PUT', { quantity }, auth)
210211
}
211212
return null

0 commit comments

Comments
 (0)