fix(youtube): request video content details
This commit is contained in:
@@ -52,7 +52,7 @@ export async function getLatestYoutubeVideos(): Promise<LatestVideo[]> {
|
||||
channelData.items?.[0]?.contentDetails?.relatedPlaylists?.uploads;
|
||||
if (!playlistId) return [];
|
||||
const response = await fetch(
|
||||
`https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=${encodeURIComponent(playlistId)}&maxResults=10&key=${encodeURIComponent(apiKey)}`,
|
||||
`https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,contentDetails&playlistId=${encodeURIComponent(playlistId)}&maxResults=10&key=${encodeURIComponent(apiKey)}`,
|
||||
{ cache: "no-store" },
|
||||
);
|
||||
if (!response.ok) throw new Error("YouTube video list failed.");
|
||||
|
||||
Reference in New Issue
Block a user