mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
df0d92f060
refs: #13380 - The i18n package is deprecated. It is being replaced with the tpl package. Co-authored-by: Aleksander Chromik <aleksander.chromik@footballco.com>
24 lines
570 B
JavaScript
24 lines
570 B
JavaScript
const config = require('../../../shared/config');
|
|
const externalRequest = require('../../lib/request-external');
|
|
const tpl = require('@tryghost/tpl');
|
|
const OEmbed = require('../../services/oembed');
|
|
const oembed = new OEmbed({config, externalRequest, tpl});
|
|
|
|
module.exports = {
|
|
docName: 'oembed',
|
|
|
|
read: {
|
|
permissions: false,
|
|
data: [
|
|
'url',
|
|
'type'
|
|
],
|
|
options: [],
|
|
query({data}) {
|
|
let {url, type} = data;
|
|
|
|
return oembed.fetchOembedDataFromUrl(url, type);
|
|
}
|
|
}
|
|
};
|