attempt sending type with response

pull/19/head
tycrek 3 years ago
parent cbc432cfd8
commit 9e8bb32cae
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -190,8 +190,8 @@ function startup() {
if (!resourceId || !data[resourceId]) return res.sendStatus(404);
// Build the oEmbed object
let { opengraph } = data[resourceId];
let oembed = { version: '1.0' };
let { opengraph, mimetype } = data[resourceId];
let oembed = { version: '1.0', type: mimetype.includes('video') ? 'video' : 'photo' };
opengraph.author && (oembed.author_name = opengraph.author);
opengraph.authorUrl && (oembed.author_url = opengraph.authorUrl);
opengraph.provider && (oembed.provider_name = opengraph.provider);

Loading…
Cancel
Save