alertTriggerRegister/handler.js
// persist a trigger d to Dynamo
persist a trigger d to Dynamo
persist a trigger d to Dynamo
function saveTriggers(d) {
  d["lastupdatedts"] = new Date().getTime();
  var saveParams = {
    TableName: "AlertTriggers",
    Item: d
  };
  console.log("saving: " + JSON.stringify(saveParams));
  return docClient.put(saveParams).promise();
}
function saveTriggers ( d ) { d [ "lastupdatedts" ] = new Date ( ) . getTime ( ) ; var saveParams = { TableName : "AlertTriggers" , Item : d } ; console . log ( "saving: " + JSON . stringify ( saveParams ) ) ; return docClient . put ( saveParams ) . promise ( ) ; }
persist a trigger d to Dynamo
persist a trigger d to Dynamo
// return promise