feat(portal-data): use internals.resolveCb
This commit is contained in:
parent
e8f05282fa
commit
3aa88141d4
@ -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));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user