<commit_before>var express = require('express')

var Busboy = require('busboy'), //
    inspect = require('util').inspect;

var multer = require('multer')
var upload = multer({
    dest: 'uploads/'
})

var jwt = require('../config/jwt');

module.exports = function(pool) {
    'use strict';

    var router = express.Router();

    router.post('/getResults', jwt.isAuthenticated(pool), function(req, res, next) {
        pool.getConnection(function(err, connection) {
            connection.query('CALL get_user_answers(?);', [req.body.userId], function(error, rows) {
                if (error) {
                    res.status(500).send({ message: error.message });
                    return next(error);
                };
                if (!rows[0].length) {
                    res.status(500).send({ message: 'Something was wrong!' });
                } else {
                    res.send(rows[0]);
                }
                connection.release();
            });
        });
    });





    return router;
};<commit_msg>Remove getResults authentication<commit_after>var express = require('express')

var Busboy = require('busboy'), //
    inspect = require('util').inspect;

var multer = require('multer')
var upload = multer({
    dest: 'uploads/'
})

var jwt = require('../config/jwt');

module.exports = function(pool) {
    'use strict';

    var router = express.Router();

    router.post('/getResults', function(req, res, next) {
        pool.getConnection(function(err, connection) {
            connection.query('CALL get_user_answers(?);', [req.body.userId], function(error, rows) {
                if (error) {
                    res.status(500).send({ message: error.message });
                    return next(error);
                };
                if (!rows[0].length) {
                    console.log(rows);
                    res.status(500).send({ message: 'Something was wrong!' });
                } else {
                    res.send(rows[0]);
                }
                connection.release();
            });
        });
    });





    return router;
};
{'fraction_non_alphanumeric': 0.15457562825983878, 'fraction_numerical': 0.007586533902323376, 'mean_word_length': 1.8246318607764391, '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': '2711657', 'n_tokens_mistral': 609, 'n_tokens_neox': 565, 'n_words': 116}