X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-change-ownership.ts;h=3259b6c0208d6b7b63d8739d3668c04257a99d8d;hb=f409f0c3b91d85c66b4841d72ea65b5fbe1483d8;hp=2d0ff48fb212e608fac91f4e729dd17b084e4794;hpb=453e83ea5d81d203ba34bc43cd5c2c750ba40568;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-change-ownership.ts b/server/models/video/video-change-ownership.ts index 2d0ff48fb..3259b6c02 100644 --- a/server/models/video/video-change-ownership.ts +++ b/server/models/video/video-change-ownership.ts @@ -3,7 +3,7 @@ import { AccountModel } from '../account/account' import { ScopeNames as VideoScopeNames, VideoModel } from './video' import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos' import { getSort } from '../utils' -import { MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership' +import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership' import * as Bluebird from 'bluebird' enum ScopeNames { @@ -43,7 +43,11 @@ enum ScopeNames { [ScopeNames.WITH_VIDEO]: { include: [ { - model: VideoModel.scope([ VideoScopeNames.WITH_THUMBNAILS, VideoScopeNames.WITH_FILES ]), + model: VideoModel.scope([ + VideoScopeNames.WITH_THUMBNAILS, + VideoScopeNames.WITH_WEBTORRENT_FILES, + VideoScopeNames.WITH_STREAMING_PLAYLISTS + ]), required: true } ] @@ -119,7 +123,7 @@ export class VideoChangeOwnershipModel extends Model .findByPk(id) } - toFormattedJSON (): VideoChangeOwnership { + toFormattedJSON (this: MVideoChangeOwnershipFormattable): VideoChangeOwnership { return { id: this.id, status: this.status,