Hello guys, when I try to post request to remove item from a custom v4 list i got this in console: success: true and status code: 1 but I also got Array error[1] where the error is "media has already been taken" but the item was not removed from my list by any means on the website
Not sure whats the problem, below is a piece of my code for delete movies or tvs:
const options = { method: 'POST', headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: 'Bearer ' + sessionStore.requestToken, }, body: JSON.stringify({items: [ {media_type: media, media_id: movieid}, ]}) };
fetch(`https://api.themoviedb.org/4/list/${list.id}/items`, options)
.then(response => response.json())
.then(response => {
console.log(response);
this.fetchFavoriteMovies();
})
.catch(err => console.error(err));
}
},
Etkö löydä elokuvaa tai TV-ohjelmaa? Kirjaudu sisään lisätäksesi se.
Haluatko pisteyttää vai lisätä tämän nimikkeen listaan?
Ei rekisteröitynyt jäsen?
Vastaus käyttäjältä thinhd464
15 toukokuu 2024 klo 7:03PM
i solved it guys method should be Delete lmaoo
Vastaus käyttäjältä Travis Bell
16 toukokuu 2024 klo 10:22AM
Yup, that would do it!