Wired up NFT custom provider to canary API

refs https://github.com/TryGhost/Team/issues/1211

This registers the NFT custom OEmbed provider to the OEmbed service for
the canary API. This should probably be done in a centralised place -
but we do not have a single instance of the OEmbed service.

When we have more information about why the OEmbed service is
instantiated like this, we can think about moving it into a singleton
service with an `init` method - which is where we can register custom
providers.
This commit is contained in:
Fabien O'Carroll 2021-11-10 16:15:31 +02:00
parent 3b7284b62f
commit dda8e0249b

View File

@ -3,6 +3,9 @@ const externalRequest = require('../../lib/request-external');
const OEmbed = require('../../services/oembed');
const oembed = new OEmbed({config, externalRequest});
const NFT = require('../../services/nft-oembed');
const nft = new NFT();
oembed.registerProvider(nft);
module.exports = {
docName: 'oembed',