mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
[#1477] add delete account
This commit is contained in:
@@ -75,5 +75,15 @@ habitrpg.controller('SettingsCtrl',
|
||||
alert(data);
|
||||
});
|
||||
}
|
||||
$scope['delete'] = function(){
|
||||
$http['delete'](API_URL + '/api/v1/user')
|
||||
.success(function(){
|
||||
localStorage.clear();
|
||||
window.location.href = '/logout';
|
||||
})
|
||||
.error(function(data){
|
||||
alert(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user