<commit_before>module.exports = {
	
  findOne: function(req, res) {
    var id_param = req.params.id,
        artist_id = parseInt(id_param, 10);

    function found(err, artist) {
      if(err)
        return res.status(404).send('');

      return res.status(200).json(artist);
    }

    Artist.findOne(artist_id).exec(found);
  }

};
<commit_msg>[LFTAPI-12] reformatting artist controller to use iif for module<commit_after>module.exports = (function() {

  var ArtistController = {};
	
  ArtistController.findOne = function(req, res) {
    var id_param = req.params.id,
        artist_id = parseInt(id_param, 10);

    function found(err, artist) {
      if(err) return res.notFound('');
      return res.status(200).json(artist);
    }

    Artist.findOne(artist_id).exec(found);
  };

  return ArtistController;

})();
{'fraction_non_alphanumeric': 0.14424242424242426, 'fraction_numerical': 0.01818181818181818, 'mean_word_length': 3.2142857142857144, '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': '5431378', 'n_tokens_mistral': 293, 'n_tokens_neox': 277, 'n_words': 51}