lib/util/requestTranslator.js
function parseUpdateAlertRequest(req){
  var reqObj = {};
  reqObj.originalUrl = req.originalUrl;
  reqObj.alertName = req.body.alertName;
  reqObj.emails = req.body.emails.split(',');
  reqObj.eventCategories = req.body.eventCategories.split(',');
  reqObj.eventNames = req.body.eventNames.split(',');
  reqObj.eventSeverities = req.body.eventSeverities.split(',');
  reqObj.uid = req.body.uid;
  reqObj.env = req.body.env;
  reqObj.alertEnabled = req.body.enabled;
  reqObj._id = req.params.id;
  reqObj.domain = req.params.domain;
  return reqObj;
}
function parseUpdateAlertRequest(req){
  var reqObj = {};
  reqObj.originalUrl = req.originalUrl;
  reqObj.alertName = req.body.alertName;
  reqObj.emails = req.body.emails.split(',');
  reqObj.eventCategories = req.body.eventCategories.split(',');
  reqObj.eventNames = req.body.eventNames.split(',');
  reqObj.eventSeverities = req.body.eventSeverities.split(',');
  reqObj.uid = req.body.uid;
  reqObj.env = req.body.env;
  reqObj.alertEnabled = req.body.enabled;
  reqObj._id = req.params.id;
  reqObj.domain = req.params.domain;
  return reqObj;
}
function parseUpdateAlertRequest ( req ) { var reqObj = { } ; reqObj . originalUrl = req . originalUrl ; reqObj . alertName = req . body . alertName ; reqObj . emails = req . body . emails . split ( ',' ) ; reqObj . eventCategories = req . body . eventCategories . split ( ',' ) ; reqObj . eventNames = req . body . eventNames . split ( ',' ) ; reqObj . eventSeverities = req . body . eventSeverities . split ( ',' ) ; reqObj . uid = req . body . uid ; reqObj . env = req . body . env ; reqObj . alertEnabled = req . body . enabled ; reqObj . _id = req . params . id ; reqObj . domain = req . params . domain ; return reqObj ; }
Parse the incoming Update Alert Request into a common object
Parse the incoming Update Alert Request into a common object