diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 13:52:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 14:53:42 +0200 |
commit | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch) | |
tree | 1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/models/video/video.ts | |
parent | 96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff) | |
download | PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip |
Cleanup model types
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 7b1f0bc31..e62bde344 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -121,18 +121,18 @@ import { createTorrentPromise } from '../../helpers/webtorrent' | |||
121 | import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' | 121 | import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' |
122 | import { | 122 | import { |
123 | MChannel, | 123 | MChannel, |
124 | MChannelActorAccountDefault, | 124 | MChannelAccountDefault, |
125 | MChannelId, | 125 | MChannelId, |
126 | MUserAccountId, | 126 | MUserAccountId, |
127 | MUserId, | 127 | MUserId, |
128 | MVideoAccountAllFiles, | ||
129 | MVideoAccountLight, | 128 | MVideoAccountLight, |
129 | MVideoAccountLightBlacklistAllFiles, | ||
130 | MVideoDetails, | 130 | MVideoDetails, |
131 | MVideoForUser, | ||
131 | MVideoFullLight, | 132 | MVideoFullLight, |
132 | MVideoIdThumbnail, | 133 | MVideoIdThumbnail, |
133 | MVideoThumbnail, | 134 | MVideoThumbnail, |
134 | MVideoWithAllFiles, | 135 | MVideoWithAllFiles, |
135 | MVideoWithBlacklistThumbnailScheduled, | ||
136 | MVideoWithRights | 136 | MVideoWithRights |
137 | } from '../../typings/models' | 137 | } from '../../typings/models' |
138 | import { MVideoFile, MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' | 138 | import { MVideoFile, MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' |
@@ -1015,7 +1015,7 @@ export class VideoModel extends Model<VideoModel> { | |||
1015 | AccountModel | 1015 | AccountModel |
1016 | ], | 1016 | ], |
1017 | transaction: options.transaction | 1017 | transaction: options.transaction |
1018 | }) as MChannelActorAccountDefault | 1018 | }) as MChannelAccountDefault |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | return sendDeleteVideo(instance, options.transaction) | 1021 | return sendDeleteVideo(instance, options.transaction) |
@@ -1209,10 +1209,10 @@ export class VideoModel extends Model<VideoModel> { | |||
1209 | 1209 | ||
1210 | return Promise.all([ | 1210 | return Promise.all([ |
1211 | VideoModel.count(countQuery), | 1211 | VideoModel.count(countQuery), |
1212 | VideoModel.scope(findScopes).findAll(findQuery) | 1212 | VideoModel.scope(findScopes).findAll<MVideoForUser>(findQuery) |
1213 | ]).then(([ count, rows ]) => { | 1213 | ]).then(([ count, rows ]) => { |
1214 | return { | 1214 | return { |
1215 | data: rows as MVideoWithBlacklistThumbnailScheduled[], | 1215 | data: rows, |
1216 | total: count | 1216 | total: count |
1217 | } | 1217 | } |
1218 | }) | 1218 | }) |
@@ -1468,7 +1468,7 @@ export class VideoModel extends Model<VideoModel> { | |||
1468 | return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(query) | 1468 | return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(query) |
1469 | } | 1469 | } |
1470 | 1470 | ||
1471 | static loadByUrlAndPopulateAccount (url: string, transaction?: Transaction): Bluebird<MVideoAccountAllFiles> { | 1471 | static loadByUrlAndPopulateAccount (url: string, transaction?: Transaction): Bluebird<MVideoAccountLightBlacklistAllFiles> { |
1472 | const query: FindOptions = { | 1472 | const query: FindOptions = { |
1473 | where: { | 1473 | where: { |
1474 | url | 1474 | url |