diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-09-25 18:05:37 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-09-25 18:05:37 -0400 |
| commit | ed083ad3191a5d7d61abb21fa7dafec5121ecaab (patch) | |
| tree | 46f73a62a8c8115d900221ae1b9fca7d4e662030 /bucky/db | |
| parent | 3aa171fbaf05d0ee5b82673443da51ed43719475 (diff) | |
post comment
Diffstat (limited to 'bucky/db')
| -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 */ |
