aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/videos.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index 2eb021ae7..a31aca019 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -8,8 +8,7 @@ import {
8 VIDEO_CATEGORIES, 8 VIDEO_CATEGORIES,
9 VIDEO_LICENCES, 9 VIDEO_LICENCES,
10 VIDEO_LANGUAGES, 10 VIDEO_LANGUAGES,
11 VIDEO_RATE_TYPES, 11 VIDEO_RATE_TYPES
12 VIDEO_FILE_RESOLUTIONS
13} from '../../initializers' 12} from '../../initializers'
14import { isUserUsernameValid } from './users' 13import { isUserUsernameValid } from './users'
15import { isArray, exists } from './misc' 14import { isArray, exists } from './misc'
@@ -128,7 +127,7 @@ function isVideoFileSizeValid (value: string) {
128} 127}
129 128
130function isVideoFileResolutionValid (value: string) { 129function isVideoFileResolutionValid (value: string) {
131 return VIDEO_FILE_RESOLUTIONS[value] !== undefined 130 return exists(value) && validator.isInt(value + '')
132} 131}
133 132
134function isVideoFileExtnameValid (value: string) { 133function isVideoFileExtnameValid (value: string) {