Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

fix change ownership typing

Rigel Kentb8b3abac6ac2
diff --git a/server/types/models/video/video-change-ownership.ts b/server/types/models/video/video-change-ownership.ts
index 244d1a6713..6cad48e4a9 100644
--- a/server/types/models/video/video-change-ownership.ts
+++ b/server/types/models/video/video-change-ownership.ts
@@ -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>
diff --git a/shared/models/videos/video-change-ownership.model.ts b/shared/models/videos/video-change-ownership.model.ts
index 0d735c7985..a9b1a17f3c 100644
--- a/shared/models/videos/video-change-ownership.model.ts
+++ b/shared/models/videos/video-change-ownership.model.ts
@@ -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
}