Fetch appstore config in settings view

This commit is contained in:
Johannes Zellner
2016-07-26 15:23:10 +02:00
parent 8165227b0a
commit 57c7ae3c2b
2 changed files with 10 additions and 7 deletions

View File

@@ -7,6 +7,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.user = Client.getUserInfo();
$scope.config = Client.getConfig();
$scope.dnsConfig = {};
$scope.appstoreConfig = {};
$scope.lastBackup = null;
$scope.backups = [];
@@ -380,6 +381,12 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.currentPlan = $scope.config.plan;
$scope.currency = $scope.config.currency === 'eur' ? '€' : '$';
} else {
Client.getAppstoreConfig(function (error, result) {
if (error) return console.error(error);
$scope.appstoreConfig = result;
});
}
});