Fix thumbnails in video blacklist list endpoint
authorChocobozzz <me@florianbigard.com>
Tue, 21 May 2019 08:59:29 +0000 (10:59 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 21 May 2019 08:59:29 +0000 (10:59 +0200)
server/models/video/video-blacklist.ts

index d9fe9dfc964ed9dc861aa132e8a7a74d3371cbb0..3bd74460d9627a9f9f4e0416f8caea801f8610a9 100644 (file)
@@ -1,6 +1,6 @@
 import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
 import { getSortOnModel, SortType, throwIfNotValid } from '../utils'
-import { VideoModel } from './video'
+import { VideoModel, ScopeNames as VideoModelScopeNames } from './video'
 import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel'
 import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist'
 import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos'
@@ -58,7 +58,7 @@ export class VideoBlacklistModel extends Model<VideoBlacklistModel> {
       order: getSortOnModel(sort.sortModel, sort.sortValue),
       include: [
         {
-          model: VideoModel,
+          model: VideoModel.scope(VideoModelScopeNames.WITH_THUMBNAILS),
           required: true,
           include: [
             {