<commit_before>var service = require('./../minions/service');
var apiConfig = require('./api-config');
var Q = require('q');
var express = require('express');

var app = express();

apiConfig.setupMiddleware(app);

/* GET all owned lists*/
app.get('/waitlist', function(req, res, next) {
  //res.send('respond with a resource');
  res.json({wait:'lists'})
});

/* GET waitlist by id*/
app.get('/waitlist/:id.txt', function(req, res, next) {
    //res.send('respond with a resource');
    var externalId = req.params.id;
    service.getListTxt(externalId).
        then(function (list) {
            res.json(list);
        })
        .catch(function (e) {
            next(e);
        })
});

/* GET waitlist by id*/
app.get('/waitlist/:id.json', function(req, res, next) {<commit_msg>fixed header<commit_after>var service = require('./../minions/service');
var apiConfig = require('./api-config');
var Q = require('q');
var express = require('express');

var app = express();

apiConfig.setupMiddleware(app);

/* GET all owned lists*/
app.get('/waitlist', function(req, res, next) {
  //res.send('respond with a resource');
  res.json({wait:'lists'})
});

/* GET waitlist by id*/
app.get('/waitlist/:id.txt', function(req, res, next) {
    //res.send('respond with a resource');
    var externalId = req.params.id;
    service.getListTxt(externalId).
        then(function (list) {
            res.type('text/plain');
            res.send(list);
        })
        .catch(function (e) {
            next(e);
        })
});

/* GET waitlist by id*/
app.get('/waitlist/:id.json', function(req, res, next) {
{'fraction_non_alphanumeric': 0.19501557632398753, 'fraction_numerical': 0.0, 'mean_word_length': 3.0049875311720697, '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': '2082884', 'n_tokens_mistral': 512, 'n_tokens_neox': 517, 'n_words': 120}