diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:44:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:47:54 +0200 |
commit | 863477173efa82a4412d2e522aa46462249f9199 (patch) | |
tree | 40f0ae28691780d79acef5ba4dbd2ef0694ce8ff /server/middlewares/validators/user-subscriptions.ts | |
parent | e0faa8ad6e18ce6248ef1ec93a59dab5b05be468 (diff) | |
download | PeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.gz PeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.zst PeerTube-863477173efa82a4412d2e522aa46462249f9199.zip |
Cleanup tests imports
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) => { |