Merge branch 'master' into update/frontend_logic
This commit is contained in:
@@ -54,3 +54,4 @@ function convertTmdbToSeasoned(tmdbObject, strictType=undefined) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = convertTmdbToSeasoned;
|
module.exports = convertTmdbToSeasoned;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,13 @@ class TMDB {
|
|||||||
|
|
||||||
// Here we convert the filtered result from the tmdb api to seaonsed objects
|
// Here we convert the filtered result from the tmdb api to seaonsed objects
|
||||||
let seasonedItems = filteredTmdbItems.map((tmdbItem) => {
|
let seasonedItems = filteredTmdbItems.map((tmdbItem) => {
|
||||||
return convertTmdbToSeasoned(tmdbItem, type);
|
|
||||||
|
if (type === 'movie')
|
||||||
|
return convertTmdbToSeasoned(tmdbItem, 'movie');
|
||||||
|
else if (type === 'show')
|
||||||
|
return convertTmdbToSeasoned(tmdbItem, 'show');
|
||||||
|
else
|
||||||
|
return convertTmdbToSeasoned(tmdbItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO add page number if results are larger than 20
|
// TODO add page number if results are larger than 20
|
||||||
|
|||||||
Reference in New Issue
Block a user