aboutsummaryrefslogtreecommitdiffstats
path: root/lib/events.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events.js')
-rw-r--r--lib/events.js10
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