From 124666fbac0762a8edaf4ed3880e897f84188583 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 29 Jun 2012 23:22:40 +0200 Subject: o Less logging. --- routes/index.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/routes/index.js b/routes/index.js index 0ecec65..5676d27 100644 --- a/routes/index.js +++ b/routes/index.js @@ -5,22 +5,12 @@ var collection_json = require('collection_json') var now='2000-01-01'; function mapRow(row) { - console.log('mapRow', row); var data = _.map(row, function(value, key) { return {name: key, value: value}; }); - console.log('mapRow', row, data); return { data: data }; } -function mapEmployee(row) { - return { - data: [ - {name: 'first_name', value: row.first_name} - ] - }; -} - exports.departments = function(req, res){ pg.connect(process.env.DATABASE_URL, function(err, client) { if(err) throw err; @@ -80,9 +70,7 @@ exports.employee = function(req, res){ client.end(); if(req.accepts('application/vnd.collection+json')) { var items = [ mapRow(employee) ]; - console.log('items', items); var object = collection_json.fromObject({collection: {items: items}}); - console.log('object', object); res.contentType('application/vnd.collection+json'); res.send(JSON.stringify(object), 200); } -- cgit v1.2.3