<commit_before>module.exports = {

  create: function(req, res) {
    var email = req.param('email'),
      password = req.param('password');

    User.authenticate(email, password).then(function(user) {
      UserSession.setup(req, user, 'password');
      return user.save({last_login: new Date()}, {patch: true});
    }).then(function() {
      res.ok({});
    }).catch(function(err) {
      res.badRequest(err);
      res.status(422); // well-formed but semantically invalid
    });
  },

  destroy: function(req, res) {
    req.session.destroy();

    // now sign out of Play! janky janky janky.
    res.redirect('/logout');
  }

}<commit_msg>attempt to fix production issue<commit_after>module.exports = {

  create: function(req, res) {
    var email = req.param('email'),
      password = req.param('password');

    User.authenticate(email, password).then(function(user) {
      UserSession.setup(req, user, 'password');
      return user.save({last_login: new Date()}, {patch: true});
    }).then(function() {
      res.ok({});
    }).catch(function(err) {
      res.status(422).send(err); // well-formed but semantically invalid
    });
  },

  destroy: function(req, res) {
    req.session.destroy();

    // now sign out of Play! janky janky janky.
    res.redirect('/logout');
  }

}
{'fraction_non_alphanumeric': 0.17501927525057825, 'fraction_numerical': 0.004626060138781804, 'mean_word_length': 3.107594936708861, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5919458', 'n_tokens_mistral': 429, 'n_tokens_neox': 410, 'n_words': 87}