diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-19 14:55:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-19 15:05:36 +0200 |
commit | 3caf77d3b11f2dbc12e52d665183d36604c1dab9 (patch) | |
tree | 53e08727d5f1dc8be2bd4f4a14dadc05f607a9fb /server/middlewares/validators | |
parent | bbe078ba55be635b5fc92f8f6286c45792b9e7e5 (diff) | |
download | PeerTube-3caf77d3b11f2dbc12e52d665183d36604c1dab9.tar.gz PeerTube-3caf77d3b11f2dbc12e52d665183d36604c1dab9.tar.zst PeerTube-3caf77d3b11f2dbc12e52d665183d36604c1dab9.zip |
Add language filters in user preferences
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/users.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index ec70fa0fd..947ed36c3 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | isUserNSFWPolicyValid, | 13 | isUserNSFWPolicyValid, |
14 | isUserPasswordValid, | 14 | isUserPasswordValid, |
15 | isUserRoleValid, | 15 | isUserRoleValid, |
16 | isUserUsernameValid, | 16 | isUserUsernameValid, isUserVideoLanguages, |
17 | isUserVideoQuotaDailyValid, | 17 | isUserVideoQuotaDailyValid, |
18 | isUserVideoQuotaValid, | 18 | isUserVideoQuotaValid, |
19 | isUserVideosHistoryEnabledValid | 19 | isUserVideosHistoryEnabledValid |
@@ -198,6 +198,9 @@ const usersUpdateMeValidator = [ | |||
198 | body('autoPlayVideo') | 198 | body('autoPlayVideo') |
199 | .optional() | 199 | .optional() |
200 | .custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'), | 200 | .custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'), |
201 | body('videoLanguages') | ||
202 | .optional() | ||
203 | .custom(isUserVideoLanguages).withMessage('Should have a valid video languages attribute'), | ||
201 | body('videosHistoryEnabled') | 204 | body('videosHistoryEnabled') |
202 | .optional() | 205 | .optional() |
203 | .custom(isUserVideosHistoryEnabledValid).withMessage('Should have a valid videos history enabled attribute'), | 206 | .custom(isUserVideosHistoryEnabledValid).withMessage('Should have a valid videos history enabled attribute'), |