- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
// POST /login
exports.login = function login(req, res) {
var email = req.body.email;
var password = req.body.password;
security.rateLimitRequest( 'reset', req, function( err ) {
if ( err )
return res.status( 400 ).send( err );
db.Account.find({email: email, password: password}, function(err, account) {
if ( err )
return res.status( 400 ).send( err );
account.getAccountStatistics(account, function(err, account) {
if ( err )
return res.status( 400 ).send( err );
account.incrementAccountLoginCount(account, function(err) {
if ( err )
return res.status( 400 ).send( err );
res.send(account);
});
});
});
});
});