<commit_before>/**
 * Created by hridhya on 1/10/16.
 */
var path = require('path');
var url = require('url');
​
module.exports = function(app){
    var posObj = [{user:'', position:{}}];
    var user = '';
​
    app.post('/api/add', function(req, res){
        console.log('POST');
        user = req.body;
        posObj.push({user: user});
        res.send(204,'Posted');
    });
​
    app.get('/api/add', function(req, res){
        res.json(posObj);
    });
​
    app.get('/position', function(req, res){
        var newPos = req.query;
        for (var i in newPos){
            console.log(i);
            posObj.push({user: user, position: i});
        }
        res.json(posObj);
    });
​
};<commit_msg>made some changes on the routes.js<commit_after>/**
 * Created by hridhya on 1/10/16.
 */
var path = require('path');
var url = require('url');
​
module.exports = function(app){
    var posObj = [{user:'', position:{}}];
    var user = '';
​
//     app.post('/api/add', function(req, res){
//         console.log('POST');
//         user = req.body;
//         posObj.push({user: user});
//         res.send(204,'Posted');
//     });
// ​
//     app.get('/api/add', function(req, res){
//         res.json(posObj);
//     });
// ​
//     app.get('/position', function(req, res){
//         var newPos = req.query;
//         for (var i in newPos){
//             console.log(i);
//             posObj.push({user: user, position: i});
//         }
//         res.json(posObj);
//     });
​
};
{'fraction_non_alphanumeric': 0.21875, 'fraction_numerical': 0.010638297872340425, 'mean_word_length': 1.9625984251968505, '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': '1424938', 'n_tokens_mistral': 517, 'n_tokens_neox': 504, 'n_words': 115}