diff --git a/packages/portal-data/lib/index.js b/packages/portal-data/lib/index.js index f7aa94f1..dba5935a 100644 --- a/packages/portal-data/lib/index.js +++ b/packages/portal-data/lib/index.js @@ -260,7 +260,7 @@ module.exports = class Data extends EventEmitter { args.deploymentGroupId = deploymentGroup.id; return new Promise((resolve, reject) => { - this.getServices(args, resolveCb(resolve, reject)); + this.getServices(args, internals.resolveCb(resolve, reject)); }); }; @@ -270,7 +270,7 @@ module.exports = class Data extends EventEmitter { return new Promise((resolve, reject) => { return deploymentGroup.version_id ? - this.getVersion(args, resolveCb(resolve, reject)) : + this.getVersion(args, internals.resolveCb(resolve, reject)) : resolve(null); }); }; @@ -291,17 +291,6 @@ module.exports = class Data extends EventEmitter { return cb(null, []); } - const getServices = (deploymentGroupId) => { - return (args) => { - args = args || {}; - args.deploymentGroupId = deploymentGroupId; - - return new Promise((resolve, reject) => { - this.getServices(args, internals.resolveCb(resolve, reject)); - }); - }; - }; - // todo getHistory cb(null, deploymentGroups.map((dg) => { return Transform.fromDeploymentGroup(this._getDeploymentGroupVersion(dg)); })); @@ -346,7 +335,7 @@ module.exports = class Data extends EventEmitter { return new Promise((resolve, reject) => { return this.getManifest({ id: version.manifest_id - }, resolveCb(resolve, reject)); + }, internals.resolveCb(resolve, reject)); }); } });