diff --git a/createCollectionsFromCSVs.js b/createCollectionsFromCSVs.js index 79c75e7..9e0606b 100644 --- a/createCollectionsFromCSVs.js +++ b/createCollectionsFromCSVs.js @@ -154,7 +154,7 @@ const parseCsv = async (collectionId, csvFilePath, token) => { const createdItem = await createItem(payload, token); console.log(`Created item: ${createdItem.name}`); const imageObj = await downloadTcgImage(createdItem.id, row.imageUrl); - const image = applyImageToItem(createdItem.id, imageObj.destination, token); + const image = await applyImageToItem(createdItem.id, imageObj.destination, token); console.log(`Applied image to item: ${createdItem.name}`); } catch (itemError) { console.error(`Error creating item for row ${row.name}:`, itemError);