aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-06-29 23:36:10 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-06-29 23:36:10 +0200
commit1de4ff6433bbfc1996d8b93d0fed369683d785a9 (patch)
tree7693c102853b029902a87c5ae6f801d15aa335a1 /routes
parente1aca93ad74cc293b89e5b24188628db67971fff (diff)
downloadexample-collection-json-db-1de4ff6433bbfc1996d8b93d0fed369683d785a9.tar.gz
example-collection-json-db-1de4ff6433bbfc1996d8b93d0fed369683d785a9.tar.bz2
example-collection-json-db-1de4ff6433bbfc1996d8b93d0fed369683d785a9.tar.xz
example-collection-json-db-1de4ff6433bbfc1996d8b93d0fed369683d785a9.zip
o Trying to fix some pg stuff.
Diffstat (limited to 'routes')
-rw-r--r--routes/index.js3
1 files changed, 0 insertions, 3 deletions
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}});