<commit_before>'use strict';

var _ = require('lodash');
var mongoose = require('mongoose');
var Activity = mongoose.model('Activity');

exports.list = function(req, res) {
    Activity
        .find()
        .exec(function(err, activities) {
            if (err) {
                return res.send(500, {error: err});
            }

            // Set all the properties we want to return
            activities = _.map(activities, function(a) {
                var result = {};
                result.id = a._id;
                result.name = a.name;
                result.className = a.className;
                result.timeLimit = a.timeLimit;
                result.givesVegBytes = a.givesVegBytes;

                return result;
            });

            res.send(activities);
        })
    ;
};
<commit_msg>Using id alias instead of _id for consistency<commit_after>'use strict';

var _ = require('lodash');
var mongoose = require('mongoose');
var Activity = mongoose.model('Activity');

exports.list = function(req, res) {
    Activity
        .find()
        .exec(function(err, activities) {
            if (err) {
                return res.send(500, {error: err});
            }

            // Set all the properties we want to return
            activities = _.map(activities, function(a) {
                var result = {};
                result.id = a.id;
                result.name = a.name;
                result.className = a.className;
                result.timeLimit = a.timeLimit;
                result.givesVegBytes = a.givesVegBytes;

                return result;
            });

            res.send(activities);
        })
    ;
};

{'fraction_non_alphanumeric': 0.1172950329144225, 'fraction_numerical': 0.003590664272890485, 'mean_word_length': 1.5180722891566265, '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': '5899749', 'n_tokens_mistral': 471, 'n_tokens_neox': 450, 'n_words': 105}