diff options
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) |