|
|
@ -16,8 +16,8 @@ redisClient.get = util.promisify(redisClient.get);
|
|
|
|
|
|
|
|
|
|
|
|
interface Promo {
|
|
|
|
interface Promo {
|
|
|
|
title: string;
|
|
|
|
title: string;
|
|
|
|
previewImage: string;
|
|
|
|
image_url: string;
|
|
|
|
videoUrl: string;
|
|
|
|
video_url: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface Character {
|
|
|
|
interface Character {
|
|
|
@ -143,7 +143,13 @@ export const getAnimeVideoPromo = async (mal_id: number) => {
|
|
|
|
return err;
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const promo: Promo[] = data.promo.map((item: Promo) => item);
|
|
|
|
const promo: Promo[] = data.promo.map((item: Promo) => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
title: item.title,
|
|
|
|
|
|
|
|
previewImage: item.image_url,
|
|
|
|
|
|
|
|
videoURL: item.video_url,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (promo.length > 0) {
|
|
|
|
if (promo.length > 0) {
|
|
|
|
/* Set the key in the redis cache. */
|
|
|
|
/* Set the key in the redis cache. */
|
|
|
|