summaryrefslogtreecommitdiff
path: root/bucky/db/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/db/index.js')
-rw-r--r--bucky/db/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/bucky/db/index.js b/bucky/db/index.js
index 74ff788..20628bb 100644
--- a/bucky/db/index.js
+++ b/bucky/db/index.js
@@ -139,7 +139,7 @@ db.getFileCounts = function(ids){
return knex.column('thread').count('* as count').select().from('files').where('thread', 'in', ids).groupBy('thread')
}
db.getFileSizes = function(ids){
- return knex.column('thread').sum('size as size').select().from('files').where('thread', 'in', ids).groupBy('thread')
+ return knex.column('thread').sum('size as size').count('* as count').select().from('files').where('thread', 'in', ids).groupBy('thread')
}
db.getFilesById = function(ids){
return File.where("id", "in", ids).fetchAll()
@@ -159,7 +159,7 @@ db.destroyFiles = function(files){
return resolve()
}
var filePath = '/bucky/data/' + thread_id + '/' + filename
- console.log(filePath)
+ console.log('delete', filePath)
s3client.deleteFile(filePath, function(err, res){
// check `err`, then do `res.pipe(..)` or `res.resume()` or whatever.
resolve()