]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/video-abuses.ts
Merge branch 'release/1.4.0' into develop
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-abuses.ts
index a61dcee1cd9ef8df9cc9809647d6b87d8d9d4001..e43d12be8b9bdae01896dbba6a26d5cbdf206582 100644 (file)
@@ -18,25 +18,9 @@ function isVideoAbuseStateValid (value: string) {
   return exists(value) && VIDEO_ABUSE_STATES[ value ] !== undefined
 }
 
-async function doesVideoAbuseExist (abuseId: number, videoId: number, res: Response) {
-  const videoAbuse = await VideoAbuseModel.loadByIdAndVideoId(abuseId, videoId)
-
-  if (videoAbuse === null) {
-    res.status(404)
-       .json({ error: 'Video abuse not found' })
-       .end()
-
-    return false
-  }
-
-  res.locals.videoAbuse = videoAbuse
-  return true
-}
-
 // ---------------------------------------------------------------------------
 
 export {
-  doesVideoAbuseExist,
   isVideoAbuseStateValid,
   isVideoAbuseReasonValid,
   isVideoAbuseModerationCommentValid