mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
updated external request format
refs TryGhost/Team#2663 -got version upgrade broke this request -moved to new format
This commit is contained in:
parent
9fa44f4d3f
commit
4fc131c49d
1 changed files with 2 additions and 5 deletions
|
@ -57,14 +57,11 @@ class TwitterOEmbedProvider {
|
||||||
}).join('&');
|
}).join('&');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await externalRequest(`https://api.twitter.com/2/tweets/${tweetId}?${queryString}`, {
|
const body = await externalRequest(`https://api.twitter.com/2/tweets/${tweetId}?${queryString}`, {
|
||||||
responseType: 'json',
|
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${this.dependencies.config.bearerToken}`
|
Authorization: `Bearer ${this.dependencies.config.bearerToken}`
|
||||||
}
|
}
|
||||||
});
|
}).json();
|
||||||
|
|
||||||
const body = JSON.parse(result.body);
|
|
||||||
|
|
||||||
oembedData.tweet_data = body.data;
|
oembedData.tweet_data = body.data;
|
||||||
oembedData.tweet_data.includes = body.includes;
|
oembedData.tweet_data.includes = body.includes;
|
||||||
|
|
Loading…
Add table
Reference in a new issue