]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/abuse.ts
Formated -> Formatted
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / abuse.ts
index 7d2e3bcfbd2c792907cc430678bc9a6f0d24e583..c9313d5f5b680fb2b42326a266342930cc63c32b 100644 (file)
@@ -4,7 +4,7 @@ import { database as db } from '../../../initializers/database'
 import * as friends from '../../../lib/friends'
 import {
   logger,
-  getFormatedObjects,
+  getFormattedObjects,
   retryTransactionWrapper
 } from '../../../helpers'
 import {
@@ -46,7 +46,7 @@ export {
 
 function listVideoAbuses (req: express.Request, res: express.Response, next: express.NextFunction) {
   db.VideoAbuse.listForApi(req.query.start, req.query.count, req.query.sort)
-    .then(result => res.json(getFormatedObjects(result.data, result.total)))
+    .then(result => res.json(getFormattedObjects(result.data, result.total)))
     .catch(err => next(err))
 }
 
@@ -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)