]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/video-blacklist.ts
rename blacklist to block/blocklist, merge block and auto-block views
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-blacklist.ts
index 17cb3b00b6b313f62474cb012ddeda3cd290cbea..de6726b8f993226221bcab283d129fb180711aff 100644 (file)
@@ -1,7 +1,7 @@
 import validator from 'validator'
 import { exists } from './misc'
 import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
-import { VideoBlacklistType } from '../../../shared/models/videos'
+import { VideoBlockType } from '../../../shared/models/videos'
 
 const VIDEO_BLACKLIST_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_BLACKLIST
 
@@ -10,7 +10,7 @@ function isVideoBlacklistReasonValid (value: string) {
 }
 
 function isVideoBlacklistTypeValid (value: any) {
-  return exists(value) && validator.isInt('' + value) && VideoBlacklistType[value] !== undefined
+  return exists(value) && validator.isInt('' + value) && VideoBlockType[value] !== undefined
 }
 
 // ---------------------------------------------------------------------------