From 14d3270f363245d2c83fcc2ac109e39743b5627e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 9 Oct 2017 11:06:13 +0200 Subject: Change how we handle resolution It was an enum before, now we just use video height --- server/helpers/custom-validators/videos.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/helpers/custom-validators') 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 { VIDEO_CATEGORIES, VIDEO_LICENCES, VIDEO_LANGUAGES, - VIDEO_RATE_TYPES, - VIDEO_FILE_RESOLUTIONS + VIDEO_RATE_TYPES } from '../../initializers' import { isUserUsernameValid } from './users' import { isArray, exists } from './misc' @@ -128,7 +127,7 @@ function isVideoFileSizeValid (value: string) { } function isVideoFileResolutionValid (value: string) { - return VIDEO_FILE_RESOLUTIONS[value] !== undefined + return exists(value) && validator.isInt(value + '') } function isVideoFileExtnameValid (value: string) { -- cgit v1.2.3