Show info also appends check_existance to url.
This commit is contained in:
@@ -50,9 +50,12 @@ const getMovie = (id, checkExistance=false, credits=false, release_dates=false)
|
|||||||
* @param {boolean} [credits=false] Include credits
|
* @param {boolean} [credits=false] Include credits
|
||||||
* @returns {object} Tmdb response
|
* @returns {object} Tmdb response
|
||||||
*/
|
*/
|
||||||
const getShow = (id, credits=false) => {
|
const getShow = (id, checkExistance=false, credits=false) => {
|
||||||
const url = new URL('v2/show', SEASONED_URL)
|
const url = new URL('v2/show', SEASONED_URL)
|
||||||
url.pathname = path.join(url.pathname, id.toString())
|
url.pathname = path.join(url.pathname, id.toString())
|
||||||
|
if (checkExistance) {
|
||||||
|
url.searchParams.append('check_existance', true)
|
||||||
|
}
|
||||||
if (credits) {
|
if (credits) {
|
||||||
url.searchParams.append('credits', true)
|
url.searchParams.append('credits', true)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ export default {
|
|||||||
this.$router.push({ name: '404' });
|
this.$router.push({ name: '404' });
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getShow(this.id)
|
getShow(this.id, true)
|
||||||
.then(this.parseResponse)
|
.then(this.parseResponse)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
this.$router.push({ name: '404' });
|
this.$router.push({ name: '404' });
|
||||||
|
|||||||
Reference in New Issue
Block a user