Cannot delete account and cannot change username
I finished the entire tutorial, but at the end of the last video you show that you can change the tagline(which works) but if you try to change the username or delete account, it does not work.
It comes up with a 404 error for both:
this is the error for deleting the account: DELETE http://127.0.0.1:8000/api/v1/accounts/undefined/ 404 (NOT FOUND)
this is the error for changing username: PUT http://127.0.0.1:8000/api/v1/accounts/frodobaggins/ 404 (NOT FOUND)
The issue with the DELETE request is that undefined is being passed as the username. I can't say what is causing the PUT issue without more information.
@brwr I was able to fix the delete profile problem. I had to fix 2 things:
in this file: (static/javascripts/profiles/controllers/profile.controller.js), I had to change vm.profile = undefined; to what is shown below.
function ProfileController($location, $routeParams, Posts, Profile, Snackbar) {
var vm = this;
vm.profile = Profile;
vm.posts = [];
activate();
and
in this file: (static/javascripts/profiles/controllers/profile.service.js), I had to change return $http.delete('/api/v1/accounts/' + profile.id + '/'); to what is shown below.
return Profile;
function destroy(profile) {
return $http.delete('/api/v1/accounts/' + profile + '/');
}
function get(username) {
return $http.get('/api/v1/accounts/' + username + '/');
}
function update(profile) {
return $http.put('/api/v1/accounts/' + profile.username + '/', profile);
I am able to delete the profile now. But I am still unable to change username and reset password.
when attempting to change the username, I get this error:

When attempting to reset the password, it has a couple problems:
-
It will successfully say "Your profile has been successfully updated" even with wrong confirm password.
-
If you change password, it does not work when you try re-logging back into app.
-
If you change the password(while logged in), you now cannot change any profile settings while logged in
When I refresh the page, it partially logs me out(still able to view settings page) and I am now unable to click the login(gives me a 403 Forbidden error code)

If you could help at all, I would greatly appreciate it.
Thanks,
Austin