diff options
author | Jack Lucas <jflucas@research.att.com> | 2017-05-10 01:48:41 +0000 |
---|---|---|
committer | Jack Lucas <jflucas@research.att.com> | 2017-05-10 01:48:41 +0000 |
commit | ff6ba434b6d91b6a4a4e9b3a7fbb8cadced229ad (patch) | |
tree | 8ae919ab8d1b174944bd6bea6602ce29153be2f6 /lib/events.js | |
parent | 0806707cbc2dd6311228facabf0a6052862c51c7 (diff) |
Post-R1 API & other updates.
Change-Id: Id0e2e15b95a5713a25a746534fc40b56599a5f06
Signed-off-by: Jack Lucas <jflucas@research.att.com>
Diffstat (limited to 'lib/events.js')
-rw-r--r-- | lib/events.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/events.js b/lib/events.js index 11a3ec0..743200d 100644 --- a/lib/events.js +++ b/lib/events.js @@ -44,7 +44,7 @@ router.use(middleware.expandTemplates); // Expand any blueprint templates /* Accept an incoming event */ router.post('/', function(req, res, next) { - let response = {requestId: req.dcaeReqId, deploymentIds:[]}; + var response = {requestId: req.dcaeReqId, deploymentIds:[]}; if (req.body.dcae_service_action === 'deploy') { @@ -56,8 +56,8 @@ router.post('/', function(req, res, next) { logger.debug(JSON.stringify(req.dcae_locations, null, '\t')); /* Create a deployer function and use it for each of the services */ - let deployer = services.createDeployer(req); - let outputs = req.dcae_blueprints.map(deployer); + var deployer = services.createDeployer(req); + var outputs = req.dcae_blueprints.map(deployer); response.deploymentIds = req.dcae_blueprints.map(function(s) {return s.deploymentId;}); } else { @@ -68,12 +68,12 @@ router.post('/', function(req, res, next) { logger.info(req.dcaeReqId + " deployments to undeploy: " + JSON.stringify(req.dcae_services)); /* Create an undeployer function and use it for each of the services */ - let undeployer = services.createUndeployer(req); + var undeployer = services.createUndeployer(req); req.dcae_services.forEach(undeployer); response.deploymentIds = req.dcae_services.map(function(s) {return s.deploymentId;}); } res.status(202).json(response); - logAccess(req, 202); + logAccess(req, 202, req.body.dcae_service_action); }); module.exports = router;
\ No newline at end of file |