added await
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user