aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-04 22:32:36 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-04 22:33:38 +0200
commit9bd2662976a75d3b03364cdbe6419e57c80f99a6 (patch)
tree0b5289660f843a8ba7f13aa79d458f53c94b36d9 /server/models/video.js
parente4c556196d7b31111f17596840d2e1d60caa7dcb (diff)
downloadPeerTube-9bd2662976a75d3b03364cdbe6419e57c80f99a6.tar.gz
PeerTube-9bd2662976a75d3b03364cdbe6419e57c80f99a6.tar.zst
PeerTube-9bd2662976a75d3b03364cdbe6419e57c80f99a6.zip
Implement user API (create, update, remove, list)
Diffstat (limited to 'server/models/video.js')
-rw-r--r--server/models/video.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/models/video.js b/server/models/video.js
index acb8353c2..14bc91b16 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -64,6 +64,7 @@ VideoSchema.statics = {
64 listByUrlAndMagnet: listByUrlAndMagnet, 64 listByUrlAndMagnet: listByUrlAndMagnet,
65 listByUrls: listByUrls, 65 listByUrls: listByUrls,
66 listOwned: listOwned, 66 listOwned: listOwned,
67 listOwnedByAuthor: listOwnedByAuthor,
67 listRemotes: listRemotes, 68 listRemotes: listRemotes,
68 load: load, 69 load: load,
69 search: search, 70 search: search,
@@ -211,6 +212,10 @@ function listOwned (callback) {
211 this.find({ filename: { $ne: null } }, callback) 212 this.find({ filename: { $ne: null } }, callback)
212} 213}
213 214
215function listOwnedByAuthor (author, callback) {
216 this.find({ filename: { $ne: null }, author: author }, callback)
217}
218
214function listRemotes (callback) { 219function listRemotes (callback) {
215 this.find({ filename: null }, callback) 220 this.find({ filename: null }, callback)
216} 221}