diff --git a/server/routes/person.ts b/server/routes/person.ts index add0b0f1c..7b8d90c4f 100644 --- a/server/routes/person.ts +++ b/server/routes/person.ts @@ -42,24 +42,28 @@ personRoutes.get('/:id/combined_credits', async (req, res) => { ); return res.status(200).json({ - cast: combinedCredits.cast.map((result) => - mapCastCredits( - result, - castMedia.find( - (med) => - med.tmdbId === result.id && med.mediaType === result.media_type + cast: combinedCredits.cast + .map((result) => + mapCastCredits( + result, + castMedia.find( + (med) => + med.tmdbId === result.id && med.mediaType === result.media_type + ) ) ) - ), - crew: combinedCredits.crew.map((result) => - mapCrewCredits( - result, - crewMedia.find( - (med) => - med.tmdbId === result.id && med.mediaType === result.media_type + .filter((item) => !item.adult), + crew: combinedCredits.crew + .map((result) => + mapCrewCredits( + result, + crewMedia.find( + (med) => + med.tmdbId === result.id && med.mediaType === result.media_type + ) ) ) - ), + .filter((item) => !item.adult), id: combinedCredits.id, }); });