diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-15 10:43:52 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-15 10:43:52 +0100 |
| commit | a239f46aaf924031ea53a95130215a2dd3f4dbd6 (patch) | |
| tree | cc8bcfa9edc0da11f0f756c16d43def5d32eceae | |
| parent | 8c0196b973d936a8659bb27d5f189410bc5f8ea6 (diff) | |
blobbyblob
| -rw-r--r-- | bucky/app/index.js | 2 | ||||
| -rw-r--r-- | bucky/db/bookshelf.js | 10 | ||||
| -rw-r--r-- | bucky/db/index.js | 4 | ||||
| -rw-r--r-- | public/assets/js/lib/views/keywords/keywords.js | 1 |
4 files changed, 3 insertions, 14 deletions
diff --git a/bucky/app/index.js b/bucky/app/index.js index 3577bc5..ca8506a 100644 --- a/bucky/app/index.js +++ b/bucky/app/index.js @@ -55,7 +55,7 @@ site.init = function(){ })) upload.init() - federate.route(app) +// federate.route(app) // app.use(csurf({ // cookie: true, diff --git a/bucky/db/bookshelf.js b/bucky/db/bookshelf.js index 32f4aba..b631545 100644 --- a/bucky/db/bookshelf.js +++ b/bucky/db/bookshelf.js @@ -6,16 +6,6 @@ var knex = require('knex')({ password : process.env.DB_PASS, database : process.env.DB_NAME, charset : 'utf8', - typecast : function (field, next) { - console.log(field.type) - if (field.type == 'BLOB') { - return field.string() - } - if (field.type == 'TINYBLOB') { - return field.string() - } - return next() - } } }) 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() diff --git a/public/assets/js/lib/views/keywords/keywords.js b/public/assets/js/lib/views/keywords/keywords.js index acb76f1..37fab16 100644 --- a/public/assets/js/lib/views/keywords/keywords.js +++ b/public/assets/js/lib/views/keywords/keywords.js @@ -9,7 +9,6 @@ var KeywordsView = View.extend({ initialize: function(opt){ this.template = this.$(".template").html() - console.log(this.$(".template")) }, load: function(){ |
