aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/user-subscriptions.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:44:32 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:47:54 +0200
commit863477173efa82a4412d2e522aa46462249f9199 (patch)
tree40f0ae28691780d79acef5ba4dbd2ef0694ce8ff /server/middlewares/validators/user-subscriptions.ts
parente0faa8ad6e18ce6248ef1ec93a59dab5b05be468 (diff)
downloadPeerTube-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.ts4
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 @@
1import { arrayify } from '@shared/core-utils'
1import express from 'express' 2import express from 'express'
2import { body, param, query } from 'express-validator' 3import { body, param, query } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' 5import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor'
5import { toArray } from '../../helpers/custom-validators/misc'
6import { WEBSERVER } from '../../initializers/constants' 6import { WEBSERVER } from '../../initializers/constants'
7import { ActorFollowModel } from '../../models/actor/actor-follow' 7import { ActorFollowModel } from '../../models/actor/actor-follow'
8import { areValidationErrors } from './shared' 8import { areValidationErrors } from './shared'
@@ -32,7 +32,7 @@ const userSubscriptionAddValidator = [
32 32
33const areSubscriptionsExistValidator = [ 33const 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) => {