diff options
Diffstat (limited to 'server/middlewares/validators/user-subscriptions.ts')
-rw-r--r-- | server/middlewares/validators/user-subscriptions.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/user-subscriptions.ts b/server/middlewares/validators/user-subscriptions.ts index a76628915..d01043c17 100644 --- a/server/middlewares/validators/user-subscriptions.ts +++ b/server/middlewares/validators/user-subscriptions.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { arrayify } from '@shared/core-utils' | ||
1 | import express from 'express' | 2 | import express from 'express' |
2 | import { body, param, query } from 'express-validator' | 3 | import { body, param, query } from 'express-validator' |
3 | import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' | 4 | import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' |
4 | import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' | 5 | import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' |
5 | import { toArray } from '../../helpers/custom-validators/misc' | ||
6 | import { WEBSERVER } from '../../initializers/constants' | 6 | import { WEBSERVER } from '../../initializers/constants' |
7 | import { ActorFollowModel } from '../../models/actor/actor-follow' | 7 | import { ActorFollowModel } from '../../models/actor/actor-follow' |
8 | import { areValidationErrors } from './shared' | 8 | import { areValidationErrors } from './shared' |
@@ -32,7 +32,7 @@ const userSubscriptionAddValidator = [ | |||
32 | 32 | ||
33 | const areSubscriptionsExistValidator = [ | 33 | const areSubscriptionsExistValidator = [ |
34 | query('uris') | 34 | query('uris') |
35 | .customSanitizer(toArray) | 35 | .customSanitizer(arrayify) |
36 | .custom(areValidActorHandles).withMessage('Should have a valid array of URIs'), | 36 | .custom(areValidActorHandles).withMessage('Should have a valid array of URIs'), |
37 | 37 | ||
38 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 38 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |