]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/video-blacklist.ts
Prevent caption listing of private videos
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-blacklist.ts
index 17cb3b00b6b313f62474cb012ddeda3cd290cbea..34fcec38e341ee1584836c21c6b48860fc274f67 100644 (file)
@@ -10,7 +10,8 @@ function isVideoBlacklistReasonValid (value: string) {
 }
 
 function isVideoBlacklistTypeValid (value: any) {
-  return exists(value) && validator.isInt('' + value) && VideoBlacklistType[value] !== undefined
+  return exists(value) &&
+    (value === VideoBlacklistType.AUTO_BEFORE_PUBLISHED || value === VideoBlacklistType.MANUAL)
 }
 
 // ---------------------------------------------------------------------------