From 0d0c04ad510264f2dbd2deb3bbf0b0d0c0605a62 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 4 Sep 2015 23:37:33 -0400 Subject: get hootbox --- lib/bucky.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/bucky.js') diff --git a/lib/bucky.js b/lib/bucky.js index ef822c4..aed6494 100644 --- a/lib/bucky.js +++ b/lib/bucky.js @@ -37,7 +37,15 @@ var bucky = module.exports = { }) next() }) - }, + }, + ensureHootbox: function (req, res, next){ + db.getCommentsForThread(1, 50).then(function(hootbox){ + res.hootbox = hootbox.forEach(function(comment){ + comment.set("comment", comment.get("comment").toString() ) + }) + next() + }) + }, /* DETAILS */ -- cgit v1.2.3-70-g09d2