aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-11 11:52:34 +0100
committerChocobozzz <me@florianbigard.com>2019-02-11 11:52:34 +0100
commit88108880bbdba473cfe36ecbebc1c3c4f972e102 (patch)
treeb242efb3b4f0d7e49d88f2d1f2063b5b3b0489c0 /server/helpers/custom-validators/users.ts
parent53a94c7cfa8368da4cd248d65df8346905938f0c (diff)
parent9b712a2017e4ab3cf12cd6bd58278905520159d0 (diff)
downloadPeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.tar.gz
PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.tar.zst
PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.zip
Merge branch 'develop' into pr/1217
Diffstat (limited to 'server/helpers/custom-validators/users.ts')
-rw-r--r--server/helpers/custom-validators/users.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts
index 90fc74a48..80652b479 100644
--- a/server/helpers/custom-validators/users.ts
+++ b/server/helpers/custom-validators/users.ts
@@ -42,6 +42,14 @@ function isUserNSFWPolicyValid (value: any) {
42 return exists(value) && nsfwPolicies.indexOf(value) !== -1 42 return exists(value) && nsfwPolicies.indexOf(value) !== -1
43} 43}
44 44
45function isUserWebTorrentEnabledValid (value: any) {
46 return isBooleanValid(value)
47}
48
49function isUserVideosHistoryEnabledValid (value: any) {
50 return isBooleanValid(value)
51}
52
45function isUserAutoPlayVideoValid (value: any) { 53function isUserAutoPlayVideoValid (value: any) {
46 return isBooleanValid(value) 54 return isBooleanValid(value)
47} 55}
@@ -69,6 +77,7 @@ function isAvatarFile (files: { [ fieldname: string ]: Express.Multer.File[] } |
69// --------------------------------------------------------------------------- 77// ---------------------------------------------------------------------------
70 78
71export { 79export {
80 isUserVideosHistoryEnabledValid,
72 isUserBlockedValid, 81 isUserBlockedValid,
73 isUserPasswordValid, 82 isUserPasswordValid,
74 isUserBlockedReasonValid, 83 isUserBlockedReasonValid,
@@ -78,6 +87,7 @@ export {
78 isUserUsernameValid, 87 isUserUsernameValid,
79 isUserEmailVerifiedValid, 88 isUserEmailVerifiedValid,
80 isUserNSFWPolicyValid, 89 isUserNSFWPolicyValid,
90 isUserWebTorrentEnabledValid,
81 isUserAutoPlayVideoValid, 91 isUserAutoPlayVideoValid,
82 isUserDisplayNameValid, 92 isUserDisplayNameValid,
83 isUserDescriptionValid, 93 isUserDescriptionValid,