From 3147e1fef646f3961d4359f70b5c818aaeb8d724 Mon Sep 17 00:00:00 2001 From: Nathan219 Date: Fri, 30 Jun 2017 13:39:56 -0700 Subject: [PATCH] rename --- lib/routes/docker-compose-cluster.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/docker-compose-cluster.js b/lib/routes/docker-compose-cluster.js index 9c0f3bcce..608924210 100644 --- a/lib/routes/docker-compose-cluster.js +++ b/lib/routes/docker-compose-cluster.js @@ -120,17 +120,17 @@ const postRoute = function (req, res, next) { /** * Takes the result from parsing the compose, and turns them into cluster create jobs * @param {SessionUser} sessionUser - This user - * @param {Object} body - Cluster create options + * @param {Object} createClusterOptions - From the request body, the options for these new clusters * @param {Object} serviceNames * @param {String[]} serviceNames.builds - Clusters created from the owning repo * @param {String[]} serviceNames.externals - Clusters created from github links * @param {Number} serviceNames.total - Total number of clusters to be generated */ -function createClusters (sessionUser, body, serviceNames) { +function createClusters (sessionUser, createClusterOptions, serviceNames) { return Promise.map(serviceNames, (service) => { - const newBody = Object.assign({name: generateHashClusterName()}, body) - return rabbitMQ.createCluster(makeCreateOptsFromBody(sessionUser, newBody, service)) - .return({ service: service, hash: newBody.name }) + const opts = Object.assign({name: generateHashClusterName()}, createClusterOptions) + return rabbitMQ.createCluster(makeCreateOptsFromBody(sessionUser, opts, service)) + .return({ service: service, hash: opts.name }) }) }