]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/ownership.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / ownership.ts
index f48acbc681843190eb2b39051b4736218fbc2d28..88355b289501e3a7434958d4c449511d0a420128 100644 (file)
@@ -1,4 +1,4 @@
-import * as express from 'express'
+import express from 'express'
 import { MVideoFullLight } from '@server/types/models'
 import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
 import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos'
@@ -105,7 +105,7 @@ function acceptOwnership (req: express.Request, res: express.Response) {
     const channel = res.locals.videoChannel
 
     // We need more attributes for federation
-    const targetVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoChangeOwnership.Video.id, t)
+    const targetVideo = await VideoModel.loadFull(videoChangeOwnership.Video.id, t)
 
     const oldVideoChannel = await VideoChannelModel.loadAndPopulateAccount(targetVideo.channelId, t)