Fix scheduled privacy and verify email validations

This commit is contained in:
Chocobozzz 2019-07-25 17:28:45 +02:00
parent 552d95b1e6
commit 2b65c4e535
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 7 additions and 12 deletions

View file

@ -98,15 +98,11 @@ function isVideoImage (files: { [ fieldname: string ]: Express.Multer.File[] } |
}
function isVideoPrivacyValid (value: number) {
return validator.isInt(value + '') && VIDEO_PRIVACIES[ value ] !== undefined
return VIDEO_PRIVACIES[ value ] !== undefined
}
function isScheduleVideoUpdatePrivacyValid (value: number) {
return validator.isInt(value + '') &&
(
value === VideoPrivacy.UNLISTED ||
value === VideoPrivacy.PUBLIC
)
return value === VideoPrivacy.UNLISTED || value === VideoPrivacy.PUBLIC
}
function isVideoOriginallyPublishedAtValid (value: string | null) {