diff options
Diffstat (limited to 'bucky/db/index.js')
| -rw-r--r-- | bucky/db/index.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bucky/db/index.js b/bucky/db/index.js index b6fa235..77e94fa 100644 --- a/bucky/db/index.js +++ b/bucky/db/index.js @@ -111,6 +111,9 @@ db.getCommentsForThread = function (id, limit, offset, order){ db.getCommentCounts = function(ids){ return knex.column('thread').count('* as count').select().from('comments').where('thread', 'in', ids).groupBy('thread') } +db.createComment = function(comment){ + return new Comment(comment).save() +} /* KEYWORDS */ |
