Show info also appends check_existance to url.

This commit is contained in:
2019-12-27 23:39:35 +01:00
parent 532993e9dd
commit f2a65d755c
2 changed files with 5 additions and 2 deletions

View File

@@ -50,9 +50,12 @@ const getMovie = (id, checkExistance=false, credits=false, release_dates=false)
* @param {boolean} [credits=false] Include credits
* @returns {object} Tmdb response
*/
const getShow = (id, credits=false) => {
const getShow = (id, checkExistance=false, credits=false) => {
const url = new URL('v2/show', SEASONED_URL)
url.pathname = path.join(url.pathname, id.toString())
if (checkExistance) {
url.searchParams.append('check_existance', true)
}
if (credits) {
url.searchParams.append('credits', true)
}