diff --git a/src/controllers/AnimeController.ts b/src/controllers/AnimeController.ts index 3e0f6bb..206edf0 100644 --- a/src/controllers/AnimeController.ts +++ b/src/controllers/AnimeController.ts @@ -298,7 +298,7 @@ export default class AnimeController { type: animeQuery[0].type || null, rating: animeQuery[0].score || null, genres: animeQuery[0].genres || null, - moreInfo: await animeExtraInfo(animeQuery[0].mal_id), + moreInfo: [await animeExtraInfo(animeQuery[0].mal_id)], promo: await getAnimeVideoPromo(animeQuery[0].mal_id), characters: await getAnimeCharacters(animeQuery[0].mal_id), related: await getRelatedAnimesFLV(animeQuery[0].id), @@ -312,7 +312,7 @@ export default class AnimeController { type: animeQuery[0].type || null, rating: animeQuery[0].score || null, genres: animeQuery[0].genres || null, - moreInfo: await animeExtraInfo(animeQuery[0].mal_id), + moreInfo: [await animeExtraInfo(animeQuery[0].mal_id)], promo: await getAnimeVideoPromo(animeQuery[0].mal_id), characters: await getAnimeCharacters(animeQuery[0].mal_id), related: await getRelatedAnimesMAL(animeQuery[0].mal_id), diff --git a/src/controllers/DirectoryController.ts b/src/controllers/DirectoryController.ts index 1409888..d842838 100644 --- a/src/controllers/DirectoryController.ts +++ b/src/controllers/DirectoryController.ts @@ -283,7 +283,7 @@ export default class DirectoryController { return next(err); } - const result: any[] = resultReq.animes.map((item: any) => { + const animes: any[] = resultReq.animes.map((item: any) => { return { id: item.id, title: item.title.trim(), @@ -298,8 +298,8 @@ export default class DirectoryController { }; }); - if (result.length > 0) { - res.status(200).json({ result }); + if (animes.length > 0) { + res.status(200).json({ animes }); } else { res.status(500).json({ message: 'Aruppi lost in the shell' }); }