We cannot use customGET
for resources, as it builds an invalid URL
This commit is contained in:
parent
47b3c60b80
commit
7ac37a3813
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
Reference in a new issue