summaryrefslogtreecommitdiff
path: root/bucky/app/bucky.js
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/app/bucky.js')
-rw-r--r--bucky/app/bucky.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js
index 940e02d..0581bc9 100644
--- a/bucky/app/bucky.js
+++ b/bucky/app/bucky.js
@@ -30,7 +30,7 @@ var bucky = module.exports = {
})
},
ensureFileCountsForThreads: function (req, res, next){
- db.getFileCounts(res.threads_ids).then(function(counts){
+ db.getFileSizes(res.threads_ids).then(function(counts){
var lookup = {}
counts.forEach(function(c){
lookup[c.thread] = c
@@ -38,6 +38,7 @@ var bucky = module.exports = {
res.threads.forEach(function(t){
var c = lookup[t.id]
t.set("file_count", c ? c.count : 0)
+ t.set("size", c ? c.size : 0)
})
next()
})