From ed083ad3191a5d7d61abb21fa7dafec5121ecaab Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 25 Sep 2015 18:05:37 -0400 Subject: post comment --- bucky/db/index.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bucky/db/index.js') 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 */ -- cgit v1.2.3-70-g09d2