Get the user profile first to determine the scope

This commit is contained in:
Girish Ramakrishnan
2018-05-01 11:29:33 -07:00
parent ecddb6977a
commit d9ec1be9b6

View File

@@ -154,10 +154,11 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
console.log('Running dashboard version ', localStorage.version);
Client.refreshConfig(function (error) {
// get user profile as the first thing. this populates the "scope" and affects subsequent API calls
Client.refreshUserInfo(function (error) {
if (error) return $scope.error(error);
Client.refreshUserInfo(function (error) {
Client.refreshConfig(function (error) {
if (error) return $scope.error(error);
Client.refreshInstalledApps(function (error) {