fix/thumbnail-code #20

Merged
vivy-agent merged 10 commits from fix/thumbnail-code into main 2026-02-22 11:10:08 +07:00
15 changed files with 334 additions and 223 deletions
Showing only changes of commit 2a3467a737 - Show all commits

View File

@ -19,7 +19,20 @@ export const updateAllEpisodeThumbnailService = async (
"No episode with no thumbnail found in the specified video service.",
);
return videosData;
const updatePayload = videosData.map((videoService) => {
const { endpointThumbnail, videos } = videoService;
return videos
.filter((video) => video.thumbnailCode !== null)
.map((video) => ({
episodeId: video.episode.id,
thumbnailCode: endpointThumbnail?.replace(
":code:",
video.thumbnailCode!,
),
}));
});
return updatePayload;
} catch (error) {
ErrorForwarder(error);
}