diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-03 10:12:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-03 10:38:19 +0100 |
commit | 47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 (patch) | |
tree | 25e2836baf3dfce6f422192d98332db1bfe65890 /server/helpers/custom-validators/videos.ts | |
parent | c5911fd347c76e8bdc05ea9f3ee9efed4a58c236 (diff) | |
download | PeerTube-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.ts | 5 |
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 | ||
33 | function isVideoNSFWValid (value: any) { | ||
34 | return typeof value === 'boolean' || (typeof value === 'string' && validator.isBoolean(value)) | ||
35 | } | ||
36 | |||
37 | function isVideoDurationValid (value: string) { | 33 | function 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, |