Merge branch 'update/frontend_logic' of github.com:kevinmidboe/seasonedShows into update/frontend_logic
This commit is contained in:
@@ -53,4 +53,5 @@ 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
|
||||||
@@ -294,4 +300,4 @@ class TMDB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = TMDB;
|
module.exports = TMDB;
|
||||||
|
|||||||
Reference in New Issue
Block a user