diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-07 22:24:50 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-07 22:24:50 +0100 |
| commit | 340c3080b38518976c5c833399d8e07a7fc561bf (patch) | |
| tree | a81a5e5e1022557650e71f7f282b9175509c3f6f /lib/bucky.js | |
| parent | 72ef99ec0666ce0a4d7051a4a7a89c54a86014b8 (diff) | |
show post metadata and thread list
Diffstat (limited to 'lib/bucky.js')
| -rw-r--r-- | lib/bucky.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bucky.js b/lib/bucky.js index bfc4b6f..70910ef 100644 --- a/lib/bucky.js +++ b/lib/bucky.js @@ -21,7 +21,9 @@ var bucky = module.exports = { lookup[c.thread] = c }) res.threads.forEach(function(thread){ - thread.set("comment_count", lookup[thread.id].count) + if (lookup[thread.id]) { + thread.set("comment_count", lookup[thread.id].count) + } }) next() }) @@ -58,7 +60,7 @@ var bucky = module.exports = { }) }, ensureHootbox: function (req, res, next){ - db.getCommentsForThread(1, 9, 0, "desc").then(function(hootbox){ + db.getCommentsForThread(1, 15, 0, "desc").then(function(hootbox){ res.hootbox = hootbox next() }) |
