Use the version in the status API instead

This is because we want to get the user's profile as the first
thing to know the scopes
This commit is contained in:
Girish Ramakrishnan
2018-05-01 11:26:57 -07:00
parent 77220038a1
commit ecddb6977a

View File

@@ -144,17 +144,19 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
$scope.status = status;
// check version and force reload if needed
if (!localStorage.version) {
localStorage.version = status.version;
} else if (localStorage.version !== status.version) {
localStorage.version = status.version;
window.location.reload(true);
}
console.log('Running dashboard version ', localStorage.version);
Client.refreshConfig(function (error) {
if (error) return $scope.error(error);
// check version and force reload if needed
if (!localStorage.version) {
localStorage.version = Client.getConfig().version;
} else if (localStorage.version !== Client.getConfig().version) {
localStorage.version = Client.getConfig().version;
window.location.reload(true);
}
Client.refreshUserInfo(function (error) {
if (error) return $scope.error(error);