aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-01 15:39:13 +0100
committerChocobozzz <me@florianbigard.com>2021-02-01 15:39:13 +0100
commit6d989edc66e7b541fcf97c2a4a6f91cbf960060a (patch)
tree9c72977cf05eee2b3a84dd1867ec60ef491b0900 /server/middlewares/validators/users.ts
parentcb5c2abc99c2e222fe18621f79cb68b805678e15 (diff)
downloadPeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.tar.gz
PeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.tar.zst
PeerTube-6d989edc66e7b541fcf97c2a4a6f91cbf960060a.zip
Add ability to update plugin auth
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r--server/middlewares/validators/users.ts3
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
7import { UserRole } from '../../../shared/models/users' 7import { UserRole } from '../../../shared/models/users'
8import { UserRegister } from '../../../shared/models/users/user-register.model' 8import { UserRegister } from '../../../shared/models/users/user-register.model'
9import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor' 9import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor'
10import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' 10import { exists, isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc'
11import { isThemeNameValid } from '../../helpers/custom-validators/plugins' 11import { isThemeNameValid } from '../../helpers/custom-validators/plugins'
12import { 12import {
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)