From d78a888277730ca96c27ab459d21180f1e145108 Mon Sep 17 00:00:00 2001 From: Joseph Nelson Date: Sat, 25 Apr 2026 22:55:03 -0700 Subject: [PATCH] added await --- createCollectionsFromCSVs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);