I’ve implemented the protected API endpoints, and also fixed the bi-directional dependencies noted in the next lecture. When I attempt to update a movie I’m running into a 400 error that I can’t seem to resolve.
I’ve gone back into Node and set requiresAuth to false and the Movie updates as it should. But, when I have requiresAuth set to true I get a 400 error.
If I comment out axios.defaults.headers.common["x-auth-token"] = jwt;
I get a 401 error, which is expected. But, when it’s enabled I get a 400 error.
I get the same issue with any of the api requests (besides GET).