[#1477] add delete account

This commit is contained in:
Tyler Renelle
2013-09-08 15:17:49 -04:00
parent f250a98fb7
commit 5c5212eb0e
5 changed files with 18 additions and 7 deletions

View File

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