mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
added type to embed request
no refs
This commit is contained in:
parent
9911e6be78
commit
01f86f1427
@ -147,14 +147,11 @@ export default class KoenigLexicalEditor extends Component {
|
||||
}
|
||||
|
||||
ReactComponent = (props) => {
|
||||
const fetchEmbed = async (url) => {
|
||||
const fetchEmbed = async (url, {type}) => {
|
||||
let oembedEndpoint = this.ghostPaths.url.api('oembed');
|
||||
let response = await this.ajax.request(oembedEndpoint, {
|
||||
data: {url, type: 'bookmark'}
|
||||
data: {url, type}
|
||||
});
|
||||
if (!response.metadata) {
|
||||
throw 'No metadata returned';
|
||||
}
|
||||
return response;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user