Code refactor
gitea/docker-discover/master This commit looks good Details

This commit is contained in:
Juan Ferrer 2020-01-29 17:14:08 +01:00
parent d46fbf556f
commit 71e66f4c93
1 changed files with 3 additions and 3 deletions

View File

@ -49,11 +49,11 @@ async function updateProxy() {
nodes = nodes.sort(sortFn);
let services = [];
for (let serviceInfo of info.services) {
let ports = serviceInfo.Endpoint.Ports;
for (let service of info.services) {
let ports = service.Endpoint.Ports;
if (!Array.isArray(ports) || !ports.length) continue;
let name = serviceInfo.Spec.Name;
let name = service.Spec.Name;
let match = name.match(/^(.+)_main$/);
if (match) name = match[1];