lib/controllers/actions/reset.js
function handlePost(req, res, sails, params){

  var func;

  if(!_.isUndefined(params.email)){
    func = sendEmail;
  }else if(!_.isUndefined(req.session.resetToken) &&
    req.session.resetToken &&
    !_.isUndefined(params.password)){
    func = issuePasswordReset;
  }

  if(!_.isUndefined(func)){
    func(req, res, sails, params);
  }else{
    res.status(404).json(404);
  }
}
function handlePost(req, res, sails, params){

  var func;

  if(!_.isUndefined(params.email)){
    func = sendEmail;
  }else if(!_.isUndefined(req.session.resetToken) &&
    req.session.resetToken &&
    !_.isUndefined(params.password)){
    func = issuePasswordReset;
  }

  if(!_.isUndefined(func)){
    func(req, res, sails, params);
  }else{
    res.status(404).json(404);
  }
}
function handlePost ( req , res , sails , params ) { var func ; if ( ! _ . isUndefined ( params . email ) ) { func = sendEmail ; } else if ( ! _ . isUndefined ( req . session . resetToken ) && req . session . resetToken && ! _ . isUndefined ( params . password ) ) { func = issuePasswordReset ; } if ( ! _ . isUndefined ( func ) ) { func ( req , res , sails , params ) ; } else { res . status ( 404 ) . json ( 404 ) ; } }
Handles the POST method for this request
@param  object req the express request object
@param  object res the express response object
@param  waterlineDAO User  the waterline User dao
@param  waterlineDAO ResetToken the waterline ResetToken dao
@param  object params all params for this request
Handles the POST method for this request