diff options
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r-- | server/middlewares/validators/users.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 218633b8d..698d7d814 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 { 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, |
@@ -35,7 +35,7 @@ import { Redis } from '../../lib/redis' | |||
35 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../lib/signup' | 35 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../lib/signup' |
36 | import { ActorModel } from '../../models/actor/actor' | 36 | import { ActorModel } from '../../models/actor/actor' |
37 | import { UserModel } from '../../models/user/user' | 37 | import { UserModel } from '../../models/user/user' |
38 | import { areValidationErrors, doesVideoExist } from './shared' | 38 | import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from './shared' |
39 | 39 | ||
40 | const usersListValidator = [ | 40 | const usersListValidator = [ |
41 | query('blocked') | 41 | query('blocked') |
@@ -302,7 +302,7 @@ const usersGetValidator = [ | |||
302 | ] | 302 | ] |
303 | 303 | ||
304 | const usersVideoRatingValidator = [ | 304 | const usersVideoRatingValidator = [ |
305 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'), | 305 | isValidVideoIdParam('videoId'), |
306 | 306 | ||
307 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 307 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
308 | logger.debug('Checking usersVideoRating parameters', { parameters: req.params }) | 308 | logger.debug('Checking usersVideoRating parameters', { parameters: req.params }) |