<commit_before>module.exports = {
  save: function(req, res, next){
    var title = req.body.title || req.query.title || '';
    var content = req.body.content || req.query.content || '';
    if(!title || !content) {
      return next(new Error('title and content must be required.'));
    }
    req.models.post.create({
      title: title,
      content: content
    }, function(err, docs){
      if(err) return next(err);

      return res.json(docs);
    });
  },
  list: function(req, res, next){
    var page = parseInt(req.query.page, 1) ? parseInt(req.query.page, 1) : 1;
    var limit = parseInt(req.query.limit, 1) ? parseInt(req.query.limit, 1) : 1;
    req.models.post.find().paginate({page: page, limit: limit}).exec(function(err, docs){
      res.json(docs);<commit_msg>param error of parseInt()<commit_after>module.exports = {
  save: function(req, res, next){
    var title = req.body.title || req.query.title || '';
    var content = req.body.content || req.query.content || '';
    if(!title || !content) {
      return next(new Error('title and content must be required.'));
    }
    req.models.post.create({
      title: title,
      content: content
    }, function(err, docs){
      if(err) return next(err);

      return res.json(docs);
    });
  },
  list: function(req, res, next){
    var page = parseInt(req.query.page, 10) ? parseInt(req.query.page, 10) : 1;
    var limit = parseInt(req.query.limit, 10) ? parseInt(req.query.limit, 10) : 1;
    req.models.post.find().paginate({page: page, limit: limit}).exec(function(err, docs){
      res.json(docs);
{'fraction_non_alphanumeric': 0.17446270543615677, 'fraction_numerical': 0.010113780025284451, 'mean_word_length': 3.1010362694300517, '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': '2876848', 'n_tokens_mistral': 533, 'n_tokens_neox': 519, 'n_words': 120}