diff --git a/static/js/services/api-service.js b/static/js/services/api-service.js index 2906ded6c..c39e3473f 100644 --- a/static/js/services/api-service.js +++ b/static/js/services/api-service.js @@ -21,7 +21,7 @@ angular.module('quay').factory('ApiService', ['Restangular', '$q', 'UtilService' 'hasError': false }; - getMethod(options, opt_parameters, opt_background).then(function(resp) { + getMethod(options, opt_parameters, opt_background, true).then(function(resp) { result.value = processor(resp); result.loading = false; }, function(resp) { @@ -208,7 +208,7 @@ angular.module('quay').factory('ApiService', ['Restangular', '$q', 'UtilService' var urlPath = path['x-path']; // Add the operation itself. - apiService[operationName] = function(opt_options, opt_parameters, opt_background) { + apiService[operationName] = function(opt_options, opt_parameters, opt_background, opt_forceget) { var one = Restangular.one(buildUrl(urlPath, opt_parameters)); if (opt_background) { one.withHttpConfig({ @@ -216,7 +216,7 @@ angular.module('quay').factory('ApiService', ['Restangular', '$q', 'UtilService' }); } - var opObj = one['custom' + method.toUpperCase()](opt_options); + var opObj = one[opt_forceget ? 'get' : 'custom' + method.toUpperCase()](opt_options); // If the operation requires_fresh_login, then add a specialized error handler that // will defer the operation's result if sudo is requested.