aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-change-ownership.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 13:52:49 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 14:53:42 +0200
commit0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch)
tree1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/typings/models/video/video-change-ownership.ts
parent96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff)
downloadPeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip
Cleanup model types
Diffstat (limited to 'server/typings/models/video/video-change-ownership.ts')
-rw-r--r--server/typings/models/video/video-change-ownership.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/typings/models/video/video-change-ownership.ts b/server/typings/models/video/video-change-ownership.ts
index 718515e2d..0410115c6 100644
--- a/server/typings/models/video/video-change-ownership.ts
+++ b/server/typings/models/video/video-change-ownership.ts
@@ -2,9 +2,13 @@ import { VideoChangeOwnershipModel } from '@server/models/video/video-change-own
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MAccountDefault, MVideoWithFileThumbnail } from '@server/typings/models' 3import { MAccountDefault, MVideoWithFileThumbnail } from '@server/typings/models'
4 4
5type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
6
7// ############################################################################
8
5export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'> 9export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'>
6 10
7export type MVideoChangeOwnershipFull = MVideoChangeOwnership & 11export type MVideoChangeOwnershipFull = MVideoChangeOwnership &
8 PickWith<VideoChangeOwnershipModel, 'Initiator', MAccountDefault> & 12 Use<'Initiator', MAccountDefault> &
9 PickWith<VideoChangeOwnershipModel, 'NextOwner', MAccountDefault> & 13 Use<'NextOwner', MAccountDefault> &
10 PickWith<VideoChangeOwnershipModel, 'Video', MVideoWithFileThumbnail> 14 Use<'Video', MVideoWithFileThumbnail>