adding all images for perfect order to repo
Build and Push Image / build-and-push (push) Successful in 1m16s
Build and Push Image / build-and-push (push) Successful in 1m16s
This commit is contained in:
@@ -3,7 +3,7 @@ const path = require('path');
|
||||
const csvParser = require('csv-parser');
|
||||
const koillectionBaseUrl = 'https://koillection.nelson-household.com/api'; // Verify this URL
|
||||
const authenticationUrl = `${koillectionBaseUrl}/authentication_token`; // URL to obtain JWT
|
||||
const imagesDir = path.join(__dirname, 'images'); // Use __dirname for correct path
|
||||
const imagesDir = path.join(__dirname, 'master-set-images/perfect-order'); // Use __dirname for correct path
|
||||
|
||||
// Define mapping of collection names to their corresponding CSV files
|
||||
const collectionsMapping = {
|
||||
@@ -208,9 +208,9 @@ const createCollectionFromCSV = async (name, csvFilePath) => {
|
||||
for (const productId of Object.keys(mergedCollectionData)) {
|
||||
const item = mergedCollectionData[productId];
|
||||
// Await each download before starting the next
|
||||
const { destination } = await downloadTcgImage(productId, item.imageUrl);
|
||||
// const { destination } = await downloadTcgImage(productId, item.imageUrl);
|
||||
|
||||
item.itemIds.forEach((id) => itemIdImageLocations.push({ itemId: id, imageDest: destination }));
|
||||
item.itemIds.forEach((id) => itemIdImageLocations.push({ itemId: id, imageDest: path.join(imagesDir, productId) }));
|
||||
}
|
||||
|
||||
// After processing all collections, check the imagesDir
|
||||
|
||||
Reference in New Issue
Block a user