From 1b1e0c5b6388536de624070673bfd007e8859051 Mon Sep 17 00:00:00 2001 From: Roy Scheeren Date: Thu, 19 Dec 2024 15:14:53 +0100 Subject: [PATCH] refactor(envited.ascs.digital): add logging Signed-off-by: Roy Scheeren --- .../aws/handlers/processAssetUpload/processAssetUpload.ts | 8 +++++--- .../modules/UploadedAsset/UploadedAsset.tsx | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/envited.ascs.digital/common/aws/handlers/processAssetUpload/processAssetUpload.ts b/apps/envited.ascs.digital/common/aws/handlers/processAssetUpload/processAssetUpload.ts index b50168c7..52d40fb6 100644 --- a/apps/envited.ascs.digital/common/aws/handlers/processAssetUpload/processAssetUpload.ts +++ b/apps/envited.ascs.digital/common/aws/handlers/processAssetUpload/processAssetUpload.ts @@ -105,8 +105,10 @@ export const _main = const pinataIpfsPromises = visualizationFiles.map( async ({ path, arrayBuffer }: { path: string; arrayBuffer: ArrayBuffer }) => { log.info(`Uploading ${path} to IPFS`) - return createGroup(metadata.minter).then(group => { - return uploadFile({ arrayBuffer, filename: last(split('/', path)) as string, group }) + return createGroup(metadata.minter).then(async group => { + log.info(`Uploading ${path} to IPFS with group ${group}`) + const file = await uploadFile({ arrayBuffer, filename: last(split('/', path)) as string, group }) + log.info(file) }) }, ) @@ -128,7 +130,7 @@ export const _main = }, ) - Promise.all(writeFilesToMetadataPromises) + await Promise.all(writeFilesToMetadataPromises) } // Update stored asset in DB diff --git a/apps/envited.ascs.digital/modules/UploadedAsset/UploadedAsset.tsx b/apps/envited.ascs.digital/modules/UploadedAsset/UploadedAsset.tsx index 591c1cd1..ee49e556 100644 --- a/apps/envited.ascs.digital/modules/UploadedAsset/UploadedAsset.tsx +++ b/apps/envited.ascs.digital/modules/UploadedAsset/UploadedAsset.tsx @@ -69,7 +69,6 @@ export const UploadedAsset: FC = ({ assetIdx, asset }) => { equals(assetIdx)(0) ? '' : 'border-t border-gray-200' } hidden px-3 py-3.5 text-sm text-gray-500 lg:table-cell`} > - {assetStatus} {match(assetStatus) .with(AssetStatus.processing, () => (