summaryrefslogtreecommitdiff
path: root/bucky/db
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-15 11:24:00 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-15 11:24:00 +0100
commit148bdaec5aaf66b885d7070894b81dfd76df2d5c (patch)
treed60aec3ac20db83fbda10632c92e0e3901fbdb52 /bucky/db
parent6c601a35b1d79bfe5b53c3c6177420c9d90fbba9 (diff)
delete files
Diffstat (limited to 'bucky/db')
-rw-r--r--bucky/db/index.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/bucky/db/index.js b/bucky/db/index.js
index 20628bb..e26124a 100644
--- a/bucky/db/index.js
+++ b/bucky/db/index.js
@@ -132,6 +132,9 @@ db.getUserThreadIds = function(user_id){
/* FILES */
+db.getFileById = function(id){
+ return (new File({'id': id})).fetch()
+}
db.getFilesForThread = function (id){
return File.query("where", "thread", "=", id).fetchAll()
}