added type to embed request

no refs
This commit is contained in:
Steve Larson 2023-04-18 14:23:36 +01:00
parent 9911e6be78
commit 01f86f1427

View File

@ -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;
};