This commit is contained in:
Wise Colt
2020-04-24 00:12:43 +03:00
parent e7d258e20b
commit 5b0f06e6ee
2 changed files with 25 additions and 20 deletions

View File

@@ -132,8 +132,8 @@ module.exports.getImages = function (detailsId, movieOrTv, tmdbApiKey, cb) {
request(creditsURL, (err, resultBody, body) => {
if (resultBody != []) {
const getJson = JSON.parse(resultBody.body);
if (getJson.status_code > 1) {
// if wrong api key error
const error = 'tmdb get images wrong api key error';
@@ -153,7 +153,12 @@ module.exports.getImages = function (detailsId, movieOrTv, tmdbApiKey, cb) {
cb(error, result);
}
}
} else {
// if wrong api key error
const error = 'error getting data';
const result = null;
cb(error, result);
}
});
}
else {

View File

@@ -1,6 +1,6 @@
{
"name": "flixinfo",
"version": "1.1.8",
"version": "1.1.9",
"description": "Get movie detail with netflix id",
"main": "index.js",
"directories": {