bug fix and add promise feature

This commit is contained in:
Wise Colt
2020-03-28 02:51:44 +03:00
parent c2b55c6f0b
commit b8a3d6dcbb
4 changed files with 164 additions and 140 deletions

View File

@@ -6,7 +6,7 @@ module.exports.getDetails = function (detailsId, movieOrTv, tmdbApiKey, cb) {
if (movieOrTv == 'movie' || movieOrTv == 'tv') {
const detailURL = config.theMovieDbURL + movieOrTv + '/' + detailsId + '?api_key=' + tmdbApiKey + '&language=en-US';
request(detailURL, (err, resultBody, body) => {
const getJson = JSON.parse(resultBody.body);