]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/middlewares/abuses.ts
Fix video block in abuse table
[github/Chocobozzz/PeerTube.git] / server / helpers / middlewares / abuses.ts
index b102273a2794b2c5f03c2f9628da6a8c3d19594a..659ad8939457d1c11e5a5afd729973a0b2f3845e 100644 (file)
@@ -26,11 +26,11 @@ async function doesVideoAbuseExist (abuseIdArg: number | string, videoUUID: stri
 }
 
 async function doesAbuseExist (abuseId: number | string, res: Response) {
-  const abuse = await AbuseModel.loadById(parseInt(abuseId + '', 10))
+  const abuse = await AbuseModel.loadByIdWithReporter(parseInt(abuseId + '', 10))
 
   if (!abuse) {
     res.status(404)
-       .json({ error: 'Video abuse not found' })
+       .json({ error: 'Abuse not found' })
 
     return false
   }