added await

This commit is contained in:
2026-04-25 22:55:03 -07:00
parent aeb67e5d5d
commit d78a888277
+1 -1
View File
@@ -154,7 +154,7 @@ const parseCsv = async (collectionId, csvFilePath, token) => {
const createdItem = await createItem(payload, token); const createdItem = await createItem(payload, token);
console.log(`Created item: ${createdItem.name}`); console.log(`Created item: ${createdItem.name}`);
const imageObj = await downloadTcgImage(createdItem.id, row.imageUrl); 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}`); console.log(`Applied image to item: ${createdItem.name}`);
} catch (itemError) { } catch (itemError) {
console.error(`Error creating item for row ${row.name}:`, itemError); console.error(`Error creating item for row ${row.name}:`, itemError);