diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 18:36:49 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 18:36:49 +0200 |
commit | 556ddc319242aafef51bae9301423ecf8701a3af (patch) | |
tree | 413829b522193584df348f0356a702b3222c3419 /server/models/pod/pod.ts | |
parent | d15ab38a905e6b50972e6f884917db9198279daf (diff) | |
download | PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.tar.gz PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.tar.zst PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.zip |
Upgrade common server dependencies
Diffstat (limited to 'server/models/pod/pod.ts')
-rw-r--r-- | server/models/pod/pod.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/models/pod/pod.ts b/server/models/pod/pod.ts index 56918e358..df6412721 100644 --- a/server/models/pod/pod.ts +++ b/server/models/pod/pod.ts | |||
@@ -143,7 +143,7 @@ list = function () { | |||
143 | } | 143 | } |
144 | 144 | ||
145 | listAllIds = function (transaction: Sequelize.Transaction) { | 145 | listAllIds = function (transaction: Sequelize.Transaction) { |
146 | const query: Sequelize.FindOptions = { | 146 | const query = { |
147 | attributes: [ 'id' ], | 147 | attributes: [ 'id' ], |
148 | transaction | 148 | transaction |
149 | } | 149 | } |
@@ -170,9 +170,7 @@ listRandomPodIdsWithRequest = function (limit: number, tableWithPods: string, ta | |||
170 | limit: limit, | 170 | limit: limit, |
171 | where: { | 171 | where: { |
172 | id: { | 172 | id: { |
173 | $in: [ | 173 | $in: Sequelize.literal(`(SELECT DISTINCT "${tableWithPods}"."podId" FROM "${tableWithPods}" ${tableWithPodsJoins})`) |
174 | Sequelize.literal(`SELECT DISTINCT "${tableWithPods}"."podId" FROM "${tableWithPods}" ${tableWithPodsJoins}`) | ||
175 | ] | ||
176 | } | 174 | } |
177 | } | 175 | } |
178 | } | 176 | } |