mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
[#1477] add reset account
This commit is contained in:
@@ -64,6 +64,16 @@ habitrpg.controller('SettingsCtrl',
|
||||
});
|
||||
$rootScope.modals.restore = false;
|
||||
}
|
||||
|
||||
$scope.reset = function(){
|
||||
$http.post(API_URL + '/api/v1/user/reset')
|
||||
.success(function(){
|
||||
User.user._v--;
|
||||
User.log({});
|
||||
$rootScope.modals.reset = false;
|
||||
})
|
||||
.error(function(data){
|
||||
alert(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user