From 3caf77d3b11f2dbc12e52d665183d36604c1dab9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Jun 2019 14:55:58 +0200 Subject: Add language filters in user preferences --- server/middlewares/validators/users.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/middlewares') 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 { isUserNSFWPolicyValid, isUserPasswordValid, isUserRoleValid, - isUserUsernameValid, + isUserUsernameValid, isUserVideoLanguages, isUserVideoQuotaDailyValid, isUserVideoQuotaValid, isUserVideosHistoryEnabledValid @@ -198,6 +198,9 @@ const usersUpdateMeValidator = [ body('autoPlayVideo') .optional() .custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'), + body('videoLanguages') + .optional() + .custom(isUserVideoLanguages).withMessage('Should have a valid video languages attribute'), body('videosHistoryEnabled') .optional() .custom(isUserVideosHistoryEnabledValid).withMessage('Should have a valid videos history enabled attribute'), -- cgit v1.2.3