From 1de4ff6433bbfc1996d8b93d0fed369683d785a9 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 29 Jun 2012 23:36:10 +0200 Subject: o Trying to fix some pg stuff. --- routes/index.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'routes') diff --git a/routes/index.js b/routes/index.js index 5676d27..9c2a157 100644 --- a/routes/index.js +++ b/routes/index.js @@ -20,7 +20,6 @@ exports.departments = function(req, res){ departments.push(row); }). on('end', function() { - client.end(); res.render('departments', { title: 'Departments', departments: departments @@ -42,7 +41,6 @@ exports.department = function(req, res){ employees.push(row); }). on('end', function() { - client.end(); if(req.accepts('application/vnd.collection+json')) { var object = collection_json.fromObject({}); res.contentType('application/vnd.collection+json'); @@ -67,7 +65,6 @@ exports.employee = function(req, res){ employee = row; }). on('end', function() { - client.end(); if(req.accepts('application/vnd.collection+json')) { var items = [ mapRow(employee) ]; var object = collection_json.fromObject({collection: {items: items}}); -- cgit v1.2.3