aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-13 16:47:01 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commit76564702b7be1b7bd0481624235960e6ff642078 (patch)
treec7db3065d389754f1c2b68a6d4fc45d7298cd5b9 /server/models
parentd0e1e32589f4e76446eb84a3ec8e7fea39963412 (diff)
downloadPeerTube-76564702b7be1b7bd0481624235960e6ff642078.tar.gz
PeerTube-76564702b7be1b7bd0481624235960e6ff642078.tar.zst
PeerTube-76564702b7be1b7bd0481624235960e6ff642078.zip
Fix videos list for api SQL request
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 7624b0649..946be6095 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -225,7 +225,8 @@ type AvailableForListIDsOptions = {
225 }, 225 },
226 include: [ 226 include: [
227 { 227 {
228 model: VideoChannelModel.scope({ method: [ VideoChannelScopeNames.SUMMARY, true ] }) 228 model: VideoChannelModel.scope({ method: [ VideoChannelScopeNames.SUMMARY, true ] }),
229 required: true
229 } 230 }
230 ] 231 ]
231 } 232 }
@@ -1566,8 +1567,8 @@ export class VideoModel extends Model<VideoModel> {
1566 apiScope.push({ 1567 apiScope.push({
1567 method: [ 1568 method: [
1568 ScopeNames.FOR_API, { 1569 ScopeNames.FOR_API, {
1569 ids, withFiles: 1570 ids,
1570 options.withFiles, 1571 withFiles: options.withFiles,
1571 videoPlaylistId: options.videoPlaylistId 1572 videoPlaylistId: options.videoPlaylistId
1572 } as ForAPIOptions 1573 } as ForAPIOptions
1573 ] 1574 ]