X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fvideo-blacklist.ts;h=34fcec38e341ee1584836c21c6b48860fc274f67;hb=795212f7acc690c88c86d0fab8772f6564d59cb8;hp=17cb3b00b6b313f62474cb012ddeda3cd290cbea;hpb=3487330d308166afb542cbacae0475693c0b059e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/video-blacklist.ts b/server/helpers/custom-validators/video-blacklist.ts index 17cb3b00b..34fcec38e 100644 --- a/server/helpers/custom-validators/video-blacklist.ts +++ b/server/helpers/custom-validators/video-blacklist.ts @@ -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) } // ---------------------------------------------------------------------------