From 91f3b1f1389076720b8c2b83d637446310bf11ac Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Tue, 21 Jun 2016 18:35:21 +1200 Subject: [PATCH] refactor(service): Config factory returns a promise --- app/components/dashboard/master-ctrl.js | 2 +- app/shared/services.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/dashboard/master-ctrl.js b/app/components/dashboard/master-ctrl.js index 330952b41..9d5080005 100644 --- a/app/components/dashboard/master-ctrl.js +++ b/app/components/dashboard/master-ctrl.js @@ -9,7 +9,7 @@ angular.module('dashboard') return window.innerWidth; }; - $scope.config = Config.get(); + $scope.config = Config; $scope.$watch($scope.getWidth, function(newValue, oldValue) { if (newValue >= mobileView) { diff --git a/app/shared/services.js b/app/shared/services.js index 5a16cb192..1085cdd58 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -143,7 +143,7 @@ angular.module('dockerui.services', ['ngResource', 'ngSanitize']) }); }]) .factory('Config', ['$resource', 'CONFIG_ENDPOINT', function($resource, CONFIG_ENDPOINT) { - return $resource(CONFIG_ENDPOINT); + return $resource(CONFIG_ENDPOINT).get(); }]) .factory('Settings', ['DOCKER_ENDPOINT', 'DOCKER_PORT', 'UI_VERSION', function SettingsFactory(DOCKER_ENDPOINT, DOCKER_PORT, UI_VERSION) { 'use strict';