aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-03 10:12:36 +0100
committerChocobozzz <me@florianbigard.com>2018-01-03 10:38:19 +0100
commit47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 (patch)
tree25e2836baf3dfce6f422192d98332db1bfe65890 /server/helpers/custom-validators/videos.ts
parentc5911fd347c76e8bdc05ea9f3ee9efed4a58c236 (diff)
downloadPeerTube-47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04.tar.gz
PeerTube-47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04.tar.zst
PeerTube-47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04.zip
Add ability to disable video comments
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r--server/helpers/custom-validators/videos.ts5
1 files changed, 0 insertions, 5 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index ee9d0ed19..1a5fdb887 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -30,10 +30,6 @@ function isVideoLanguageValid (value: number) {
30 return value === null || VIDEO_LANGUAGES[value] !== undefined 30 return value === null || VIDEO_LANGUAGES[value] !== undefined
31} 31}
32 32
33function isVideoNSFWValid (value: any) {
34 return typeof value === 'boolean' || (typeof value === 'string' && validator.isBoolean(value))
35}
36
37function isVideoDurationValid (value: string) { 33function isVideoDurationValid (value: string) {
38 return exists(value) && validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.DURATION) 34 return exists(value) && validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.DURATION)
39} 35}
@@ -131,7 +127,6 @@ export {
131 isVideoCategoryValid, 127 isVideoCategoryValid,
132 isVideoLicenceValid, 128 isVideoLicenceValid,
133 isVideoLanguageValid, 129 isVideoLanguageValid,
134 isVideoNSFWValid,
135 isVideoTruncatedDescriptionValid, 130 isVideoTruncatedDescriptionValid,
136 isVideoDescriptionValid, 131 isVideoDescriptionValid,
137 isVideoFileInfoHashValid, 132 isVideoFileInfoHashValid,