Provider argument for setup is never used

This commit is contained in:
Johannes Zellner
2016-07-27 14:15:22 +02:00
parent 57d2a3ff6e
commit 3020071fe4

View File

@@ -64,14 +64,6 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
Client.logout();
};
$scope.setup = function (provider) {
if (provider === 'caas') {
window.location.href = '/error.html?errorCode=1';
} else {
window.location.href = '/setup.html';
}
};
$scope.error = function (error) {
console.error(error);
window.location.href = '/error.html';
@@ -111,7 +103,11 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
Client.getStatus(function (error, status) {
if (error) return $scope.error(error);
if (!status.activated) return $scope.setup();
if (!status.activated) {
window.location.href = '/setup.html';
return;
}
Client.refreshConfig(function (error) {
if (error) return $scope.error(error);