From 31e103be9d5bec7468f73058f56bc369e73dc86f Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Mon, 15 Nov 2021 10:14:45 +0200 Subject: [PATCH] Updated NFT OEmbed provider to return metadata refs https://github.com/TryGhost/Team/issues/1211 Instead of rendering the HTML as an embed - we will send back the necessary data. This will allow us to keep all the knowledge of HTML structure in the Koenig repository. --- core/server/services/nft-oembed.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/core/server/services/nft-oembed.js b/core/server/services/nft-oembed.js index 4ef900dfdc..15182988e1 100644 --- a/core/server/services/nft-oembed.js +++ b/core/server/services/nft-oembed.js @@ -46,24 +46,13 @@ class NFTOEmbedProvider { author_url: `https://opensea.io/${result.body.creator.user.username}`, provider_name: 'OpenSea', provider_url: 'https://opensea.io', - html: ` - - - - - `, + html: '', width: 1000, height: 1000, - noIframe: true + card_type: 'nft', + image_url: result.body.image_url, + creator_name: result.body.creator.user.username, + description: result.body.description }; } }