import { ScopeNames as VideoScopeNames, VideoModel } from './video'
import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos'
import { getSort } from '../utils'
-import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership'
+import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/types/models/video/video-change-ownership'
import * as Bluebird from 'bluebird'
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,
+ VideoScopeNames.WITH_ACCOUNT_DETAILS
+ ]),
required: true
}
]
status: this.status,
initiatorAccount: this.Initiator.toFormattedJSON(),
nextOwnerAccount: this.NextOwner.toFormattedJSON(),
- video: {
- id: this.Video.id,
- uuid: this.Video.uuid,
- url: this.Video.url,
- name: this.Video.name
- },
+ video: this.Video.toFormattedJSON(),
createdAt: this.createdAt
}
}