<commit_before>'use strict';

exports.index = function(req, res) {
    res.render('index', {
        user: req.user || null,
        request: req
    });
};

exports.getaccept = function(req, res) {
    res.json('get reqx');
};

exports.accept = function(req, res) {
    res.set('Content-Type', 'text/xml');
    res.sendFile(__dirname + '/1.xml');

};

//handle input 
exports.handle = function(req, res){
    //switch uses strict comparison '==='
    switch (req.body.Digits) {
        case '1':
            //food handle
            break;
        case '2':
            //uber handler
            //uber Twiml Send
            res.set('Content-Type', 'text/xml');
            res.sendFile(__dirname + '/uber.xml');
            //request to actual uber
            var request = require('request');
            request
                .get('http://grndma.ngrok.io/api/getUber');
            break;
        case '3':
            //tech handler
            break;
        case '4':
            //laundry handler
            break;
        default:
            //error handler
            break;
    }
    if (req.body.Digits === '1') {    
        res.set('Content-Type', 'text/xml');
        res.sendFile(__dirname + '/2.xml');
    }
};

exports.uberAuth = function(req, res) {
  var request = require('request');
    request({
      url: 'https://sandbox-api.uber.com/v1/products',
      method: 'GET',
      qs: {
      'server_token': '<KEY>',
      'latitude': 41.9373,
      'longitude': -87.6551
      }<commit_msg>cleanup<commit_after>'use strict';

exports.index = function(req, res) {
    res.render('index', {
        user: req.user || null,
        request: req
    });
};

exports.getaccept = function(req, res) {
    res.json('get reqx');
};

exports.accept = function(req, res) {
    res.set('Content-Type', 'text/xml');
    res.sendFile(__dirname + '/1.xml');

};

//handle input 
exports.handle = function(req, res){
    //switch uses strict comparison '==='
    switch (req.body.Digits) {
        case '1':
            //food handle
            break;
        case '2':
            //uber handler
            //uber Twiml Send
            res.set('Content-Type', 'text/xml');
            res.sendFile(__dirname + '/uber.xml');
            //request to actual uber
            var request = require('request');
            request
                .get('http://grndma.ngrok.io/api/getUber');
            break;
        case '3':
            //tech handler
            break;
        case '4':
            //laundry handler
            break;
        default:
            //error handler
            break;
    }
};

exports.uberAuth = function(req, res) {
  var request = require('request');
    request({
      url: 'https://sandbox-api.uber.com/v1/products',
      method: 'GET',
      qs: {
      'server_token': '<KEY>',
      'latitude': 41.9373,
      'longitude': -87.6551
      }
{'fraction_non_alphanumeric': 0.15954514128187458, 'fraction_numerical': 0.013094417643004824, 'mean_word_length': 1.6487226277372262, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '1200601', 'n_tokens_mistral': 905, 'n_tokens_neox': 883, 'n_words': 191}