GUACAMOLE-508: Use object instead of array for multiple promises.

This commit is contained in:
Nick Couchman
2018-03-02 21:45:21 -05:00
parent 4869968c8f
commit 8ad579b90b

View File

@@ -163,9 +163,12 @@ angular.module('navigation').factory('userPageService', ['$injector',
authenticationService.getCurrentUsername() authenticationService.getCurrentUsername()
); );
$q.all([getRootGroups,getPermissionSets]) $q.all({
rootGroups : getRootGroups,
permissionsSets : getPermissionSets
})
.then(function rootConnectionGroupsPermissionsRetrieved(data) { .then(function rootConnectionGroupsPermissionsRetrieved(data) {
deferred.resolve(generateHomePage(data[0],data[1])); deferred.resolve(generateHomePage(data.rootGroups,data.permissionsSets));
}); });
return deferred.promise; return deferred.promise;