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));
}
},
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by thinhd464
on May 15, 2024 at 7:03 PM
i solved it guys method should be Delete lmaoo
Reply by Travis Bell
on May 16, 2024 at 10:22 AM
Yup, that would do it!