aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-24 09:56:25 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:22 +0200
commit2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063 (patch)
tree3f03677870548c648070ac138a2b5ca36ee8fbeb /server/models/video/video.ts
parentb876eaf11a1ed9683664d94767ca684ba5b77753 (diff)
downloadPeerTube-2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063.tar.gz
PeerTube-2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063.tar.zst
PeerTube-2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063.zip
Relax videos list thumbnail api join
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 18f18795e..5fb529e8d 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -239,6 +239,11 @@ type AvailableForListIDsOptions = {
239 { 239 {
240 model: VideoChannelModel.scope({ method: [ VideoChannelScopeNames.SUMMARY, true ] }), 240 model: VideoChannelModel.scope({ method: [ VideoChannelScopeNames.SUMMARY, true ] }),
241 required: true 241 required: true
242 },
243 {
244 attributes: [ 'type', 'filename' ],
245 model: ThumbnailModel,
246 required: false
242 } 247 }
243 ] 248 ]
244 } 249 }
@@ -1599,7 +1604,7 @@ export class VideoModel extends Model<VideoModel> {
1599 ] 1604 ]
1600 } 1605 }
1601 1606
1602 const apiScope: (string | ScopeOptions)[] = [ ScopeNames.WITH_THUMBNAILS ] 1607 const apiScope: (string | ScopeOptions)[] = []
1603 1608
1604 if (options.user) { 1609 if (options.user) {
1605 apiScope.push({ method: [ ScopeNames.WITH_USER_HISTORY, options.user.id ] }) 1610 apiScope.push({ method: [ ScopeNames.WITH_USER_HISTORY, options.user.id ] })