From a671e7c99b495a347b2a580e53a11e10424edd4b Mon Sep 17 00:00:00 2001 From: Roy Scheeren Date: Fri, 22 Nov 2024 21:17:08 +0100 Subject: [PATCH] refactor(envited.ascs.digital): debug Signed-off-by: Roy Scheeren --- .../common/asset/validateAndCreateMetadata.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts b/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts index 7fb87ed2..6c06e0bb 100644 --- a/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts +++ b/apps/envited.ascs.digital/common/asset/validateAndCreateMetadata.ts @@ -222,8 +222,7 @@ export const _validateAndCreateMetadata = try { const { conforms, reports, data } = await getShaclSchemaAndValidate(byteArray) const assetCID = await createFilename(byteArray) - console.log(data.domainMetadata, typeof data.domainMetadata) - const domainMetadataCID = await createFilename(data.domainMetadata) + const domainMetadataCID = await createFilename(Buffer.from(JSON.stringify(data.domainMetadata))) const connection = await db() const user = await connection.getUserById(asset.userId) @@ -245,7 +244,7 @@ export const _validateAndCreateMetadata = visualizationFiles, })(data.manifest) - const modifiedManifestCID = await createFilename(modifiedManifest) + const modifiedManifestCID = await createFilename(Buffer.from(JSON.stringify(modifiedManifest))) const tokenMetadata = createTokenMetadata({ assetCID,