diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-01 15:39:13 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-01 15:39:13 +0100 |
commit | 6d989edc66e7b541fcf97c2a4a6f91cbf960060a (patch) | |
tree | 9c72977cf05eee2b3a84dd1867ec60ef491b0900 /server/middlewares/validators | |
parent | cb5c2abc99c2e222fe18621f79cb68b805678e15 (diff) | |
download | PeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.tar.gz PeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.tar.zst PeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.zip |
Add ability to update plugin auth
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/users.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 6b6e6c2df..345571e83 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -7,7 +7,7 @@ import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-code | |||
7 | import { UserRole } from '../../../shared/models/users' | 7 | import { UserRole } from '../../../shared/models/users' |
8 | import { UserRegister } from '../../../shared/models/users/user-register.model' | 8 | import { UserRegister } from '../../../shared/models/users/user-register.model' |
9 | import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor' | 9 | import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor' |
10 | import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' | 10 | import { exists, isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' |
11 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' | 11 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' |
12 | import { | 12 | import { |
13 | isNoInstanceConfigWarningModal, | 13 | isNoInstanceConfigWarningModal, |
@@ -201,6 +201,7 @@ const usersUpdateValidator = [ | |||
201 | body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'), | 201 | body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'), |
202 | body('videoQuota').optional().custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'), | 202 | body('videoQuota').optional().custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'), |
203 | body('videoQuotaDaily').optional().custom(isUserVideoQuotaDailyValid).withMessage('Should have a valid daily user quota'), | 203 | body('videoQuotaDaily').optional().custom(isUserVideoQuotaDailyValid).withMessage('Should have a valid daily user quota'), |
204 | body('pluginAuth').optional(), | ||
204 | body('role') | 205 | body('role') |
205 | .optional() | 206 | .optional() |
206 | .customSanitizer(toIntOrNull) | 207 | .customSanitizer(toIntOrNull) |