]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/abuse.ts
Use global uuid instead of remoteId for videos
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / abuse.ts
index 7d2e3bcfbd2c792907cc430678bc9a6f0d24e583..5cf0303fbf92bee0722a9aca39fceaa858fd1d7d 100644 (file)
@@ -62,7 +62,7 @@ function reportVideoAbuseRetryWrapper (req: express.Request, res: express.Respon
 }
 
 function reportVideoAbuse (req: express.Request, res: express.Response) {
-  const videoInstance = res.locals.video
+  const videoInstance = res.locals.video as VideoInstance
   const reporterUsername = res.locals.oauth.token.User.username
   const body: VideoAbuseCreate = req.body
 
@@ -81,7 +81,7 @@ function reportVideoAbuse (req: express.Request, res: express.Response) {
           const reportData = {
             reporterUsername,
             reportReason: abuse.reason,
-            videoRemoteId: videoInstance.remoteId
+            videoUUID: videoInstance.uuid
           }
 
           return friends.reportAbuseVideoToFriend(reportData, videoInstance, t).then(() => videoInstance)