/*made by Miguel Rodrigues @ KBZ miguel.rodrigues@knowledgebiz.pt*/
console.log("Defining deleteCtrl");
angular.module('mainApp')
.controller('deleteCtrl', function($scope, $routeParams, $http, appService) {
appService.deleteApp($routeParams.appid).then(function(response){
if(response.data.success){
console.log("deleteApp response: " + JSON.stringify(response.data));
window.location = '/'+$routeParams.developerid
}else{
//call notification service
console.log("Something went wrong...");
}
}).then(function(){
console.log("deleteApp timed out");
});
console.log("Loading deleteCtrl");
});