From c06f440e4a41853fc30ff5b231c68bd766ba96fa Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 11 Dec 2017 09:52:40 +0100 Subject: remove comments --- bucky/db/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'bucky/db') diff --git a/bucky/db/index.js b/bucky/db/index.js index 3e88fb7..0ce6e5f 100644 --- a/bucky/db/index.js +++ b/bucky/db/index.js @@ -81,7 +81,7 @@ db.createThread = function(data){ } db.updateThread = function(data){ } -db.removeThread = function(id){ +db.destroyThread = function(id){ } /* FILES */ @@ -101,7 +101,7 @@ db.getFilesById = function(ids){ db.createFile = function(data){ return new db.File(data).save() } -db.removeFile = function(id){ +db.destroyFile = function(id){ } /* COMMENTS */ @@ -123,6 +123,9 @@ db.getCommentsForThread = function (id, limit, offset, order){ return comments }) } +db.getCommentById = function(id){ + return (new Comment({'id': id})).fetch() +} db.getCommentsById = function(ids){ return Comment.where("id", "in", ids).fetchAll() } @@ -134,7 +137,7 @@ db.createComment = function(data){ } db.updateComment = function(data){ } -db.removeComment = function(id){ +db.destroyComment = function(id){ } @@ -154,7 +157,7 @@ db.createKeyword = function(data){ } db.updateKeyword = function(data){ } -db.removeKeyword = function(id){ +db.destroyKeyword = function(id){ } @@ -195,5 +198,5 @@ db.createMessage = function(data){ } db.updateMessage = function(data){ } -db.removeMessage = function(id){ +db.destroyMessage = function(id){ } -- cgit v1.2.3-70-g09d2