]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
fix change ownership typing
authorRigel Kent <sendmemail@rigelk.eu>
Sun, 28 Jun 2020 20:45:25 +0000 (22:45 +0200)
committerRigel Kent <sendmemail@rigelk.eu>
Sun, 28 Jun 2020 20:45:27 +0000 (22:45 +0200)
server/types/models/video/video-change-ownership.ts
shared/models/videos/video-change-ownership.model.ts

index 244d1a6713aaf9a68030865d9d600821dbf265c4..6cad48e4a91c9a8f7dbbd976a451c2f0e46d174a 100644 (file)
@@ -1,7 +1,7 @@
 import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
 import { PickWith } from '@shared/core-utils'
 import { MAccountDefault, MAccountFormattable } from '../account/account'
-import { MVideo, MVideoWithAllFiles } from './video'
+import { MVideoWithAllFiles, MVideoFormattable } from './video'
 
 type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
 
@@ -23,4 +23,4 @@ export type MVideoChangeOwnershipFormattable =
   Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> &
   Use<'Initiator', MAccountFormattable> &
   Use<'NextOwner', MAccountFormattable> &
-  Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'url' | 'name'>>
+  Use<'Video', MVideoFormattable>
index 0d735c7985ed62614a562e9c1c18af45a479e10d..a9b1a17f3c9030a28e9d1196b58f1194b190bf8e 100644 (file)
@@ -1,16 +1,12 @@
 import { Account } from '../actors'
+import { Video } from './video.model'
 
 export interface VideoChangeOwnership {
   id: number
   status: VideoChangeOwnershipStatus
   initiatorAccount: Account
   nextOwnerAccount: Account
-  video: {
-    id: number
-    name: string
-    uuid: string
-    url: string
-  }
+  video: Video
   createdAt: Date
 }