diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-09 16:07:10 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-10 21:12:09 +0200 |
commit | 3487330d308166afb542cbacae0475693c0b059e (patch) | |
tree | 6a7b6ea3dd105661354bf0df6c6d3f7a7abe64e8 /server/helpers/custom-validators | |
parent | 5baee5fca418487e72ddcd6419d31bca8659b668 (diff) | |
download | PeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.gz PeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.zst PeerTube-3487330d308166afb542cbacae0475693c0b059e.zip |
preserve original variable names server-side
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r-- | server/helpers/custom-validators/video-blacklist.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/video-blacklist.ts b/server/helpers/custom-validators/video-blacklist.ts index de6726b8f..17cb3b00b 100644 --- a/server/helpers/custom-validators/video-blacklist.ts +++ b/server/helpers/custom-validators/video-blacklist.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import validator from 'validator' | 1 | import validator from 'validator' |
2 | import { exists } from './misc' | 2 | import { exists } from './misc' |
3 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' | 3 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' |
4 | import { VideoBlockType } from '../../../shared/models/videos' | 4 | import { VideoBlacklistType } from '../../../shared/models/videos' |
5 | 5 | ||
6 | const VIDEO_BLACKLIST_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_BLACKLIST | 6 | const VIDEO_BLACKLIST_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_BLACKLIST |
7 | 7 | ||
@@ -10,7 +10,7 @@ function isVideoBlacklistReasonValid (value: string) { | |||
10 | } | 10 | } |
11 | 11 | ||
12 | function isVideoBlacklistTypeValid (value: any) { | 12 | function isVideoBlacklistTypeValid (value: any) { |
13 | return exists(value) && validator.isInt('' + value) && VideoBlockType[value] !== undefined | 13 | return exists(value) && validator.isInt('' + value) && VideoBlacklistType[value] !== undefined |
14 | } | 14 | } |
15 | 15 | ||
16 | // --------------------------------------------------------------------------- | 16 | // --------------------------------------------------------------------------- |