[#1477] add reset account

This commit is contained in:
Tyler Renelle
2013-09-08 15:11:04 -04:00
parent 5e51148f8e
commit f250a98fb7
5 changed files with 38 additions and 136 deletions

View File

@@ -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);
});
}
}
]);