Permalink
Browse files

If the apiEndpoint config is not set then call /registry/ these reque…

…sts are forwarded to the internal API by nginx.
  • Loading branch information...
1 parent a462618 commit 7ab6457baecac2136415a60a6caa6c0c87af3596 @rossf7 rossf7 committed Sep 6, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/scripts/services/registryservice.js
@@ -36,7 +36,7 @@
return {
inspect: function (list) {
function doInspection() {
- return $http.post(ENV.apiEndpoint + '/registry/analyze', { 'repos': list })
+ return $http.post((ENV.apiEndpoint || '') + '/registry/analyze', { 'repos': list })
.then(function(response) {
var images = response.data,
list = [],
@@ -64,12 +64,12 @@
},
search: function(name) {
return retryQuery(function() {
- return $http.get(ENV.apiEndpoint + '/registry/search?name='+name);
+ return $http.get((ENV.apiEndpoint || '') + '/registry/search?name='+name);
}, 3);
},
fetchTags: function(name) {
return retryQuery(function() {
- return $http.get(ENV.apiEndpoint + '/registry/images/'+name+'/tags');
+ return $http.get((ENV.apiEndpoint || '') + '/registry/images/'+name+'/tags');
}, 3);
}
};

0 comments on commit 7ab6457

Please sign in to comment.