mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Server: add video language attribute
This commit is contained in:
parent
023553a2bd
commit
3092476e64
14 changed files with 197 additions and 3 deletions
|
@ -87,6 +87,7 @@ function isCommonVideoAttributesValid (video) {
|
|||
videosValidators.isVideoDateValid(video.updatedAt) &&
|
||||
videosValidators.isVideoCategoryValid(video.category) &&
|
||||
videosValidators.isVideoLicenceValid(video.licence) &&
|
||||
videosValidators.isVideoLanguageValid(video.language) &&
|
||||
videosValidators.isVideoNSFWValid(video.nsfw) &&
|
||||
videosValidators.isVideoDescriptionValid(video.description) &&
|
||||
videosValidators.isVideoDurationValid(video.duration) &&
|
||||
|
|
|
@ -15,6 +15,7 @@ const videosValidators = {
|
|||
isVideoDateValid,
|
||||
isVideoCategoryValid,
|
||||
isVideoLicenceValid,
|
||||
isVideoLanguageValid,
|
||||
isVideoNSFWValid,
|
||||
isVideoDescriptionValid,
|
||||
isVideoDurationValid,
|
||||
|
@ -51,6 +52,10 @@ function isVideoLicenceValid (value) {
|
|||
return constants.VIDEO_LICENCES[value] !== undefined
|
||||
}
|
||||
|
||||
function isVideoLanguageValid (value) {
|
||||
return constants.VIDEO_LANGUAGES[value] !== undefined
|
||||
}
|
||||
|
||||
function isVideoNSFWValid (value) {
|
||||
return validator.isBoolean(value)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue