aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/pod.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-06 23:24:47 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-06 23:46:36 +0100
commited04d94f6d7132055f97a2f757b85c03c5f2a0b6 (patch)
tree2f1f8c6f6e46b9ab18ba009403f80b14af61af68 /server/models/pod.js
parentbb0b243c92577872a5f4d98f707e078082af4d2a (diff)
downloadPeerTube-ed04d94f6d7132055f97a2f757b85c03c5f2a0b6.tar.gz
PeerTube-ed04d94f6d7132055f97a2f757b85c03c5f2a0b6.tar.zst
PeerTube-ed04d94f6d7132055f97a2f757b85c03c5f2a0b6.zip
Server: try to have a better video integrity
Diffstat (limited to 'server/models/pod.js')
-rw-r--r--server/models/pod.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/models/pod.js b/server/models/pod.js
index 83ecd732e..8e7dd1fd8 100644
--- a/server/models/pod.js
+++ b/server/models/pod.js
@@ -115,11 +115,18 @@ function list (callback) {
115 return this.findAll().asCallback(callback) 115 return this.findAll().asCallback(callback)
116} 116}
117 117
118function listAllIds (callback) { 118function listAllIds (transaction, callback) {
119 if (!callback) {
120 callback = transaction
121 transaction = null
122 }
123
119 const query = { 124 const query = {
120 attributes: [ 'id' ] 125 attributes: [ 'id' ]
121 } 126 }
122 127
128 if (transaction) query.transaction = transaction
129
123 return this.findAll(query).asCallback(function (err, pods) { 130 return this.findAll(query).asCallback(function (err, pods) {
124 if (err) return callback(err) 131 if (err) return callback(err)
125 132