rename getServices to getServiceIds

This commit is contained in:
Girish Ramakrishnan
2021-01-21 12:38:12 -08:00
parent 304fe45ee8
commit d294dea84d
2 changed files with 6 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
exports = module.exports = {
getServices,
getServiceIds,
getService,
getServiceConfig,
configureService,
@@ -347,19 +347,19 @@ function containerStatus(containerName, tokenEnvName, callback) {
});
}
function getServices(callback) {
function getServiceIds(callback) {
assert.strictEqual(typeof callback, 'function');
let services = Object.keys(SERVICES);
let serviceIds = Object.keys(SERVICES);
appdb.getAll(function (error, apps) {
if (error) return callback(error);
for (let app of apps) {
if (app.manifest.addons && app.manifest.addons['redis']) services.push(`redis:${app.id}`);
if (app.manifest.addons && app.manifest.addons['redis']) serviceIds.push(`redis:${app.id}`);
}
callback(null, services);
callback(null, serviceIds);
});
}