aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/user-subscriptions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/user-subscriptions.ts')
-rw-r--r--server/middlewares/validators/user-subscriptions.ts9
1 files changed, 0 insertions, 9 deletions
diff --git a/server/middlewares/validators/user-subscriptions.ts b/server/middlewares/validators/user-subscriptions.ts
index d9e6aa667..a76628915 100644
--- a/server/middlewares/validators/user-subscriptions.ts
+++ b/server/middlewares/validators/user-subscriptions.ts
@@ -3,7 +3,6 @@ import { body, param, query } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' 4import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor'
5import { toArray } from '../../helpers/custom-validators/misc' 5import { toArray } from '../../helpers/custom-validators/misc'
6import { logger } from '../../helpers/logger'
7import { WEBSERVER } from '../../initializers/constants' 6import { WEBSERVER } from '../../initializers/constants'
8import { ActorFollowModel } from '../../models/actor/actor-follow' 7import { ActorFollowModel } from '../../models/actor/actor-follow'
9import { areValidationErrors } from './shared' 8import { areValidationErrors } from './shared'
@@ -14,8 +13,6 @@ const userSubscriptionListValidator = [
14 .not().isEmpty(), 13 .not().isEmpty(),
15 14
16 (req: express.Request, res: express.Response, next: express.NextFunction) => { 15 (req: express.Request, res: express.Response, next: express.NextFunction) => {
17 logger.debug('Checking userSubscriptionListValidator parameters', { parameters: req.query })
18
19 if (areValidationErrors(req, res)) return 16 if (areValidationErrors(req, res)) return
20 17
21 return next() 18 return next()
@@ -27,8 +24,6 @@ const userSubscriptionAddValidator = [
27 .custom(isValidActorHandle).withMessage('Should have a valid URI to follow (username@domain)'), 24 .custom(isValidActorHandle).withMessage('Should have a valid URI to follow (username@domain)'),
28 25
29 (req: express.Request, res: express.Response, next: express.NextFunction) => { 26 (req: express.Request, res: express.Response, next: express.NextFunction) => {
30 logger.debug('Checking userSubscriptionAddValidator parameters', { parameters: req.body })
31
32 if (areValidationErrors(req, res)) return 27 if (areValidationErrors(req, res)) return
33 28
34 return next() 29 return next()
@@ -41,8 +36,6 @@ const areSubscriptionsExistValidator = [
41 .custom(areValidActorHandles).withMessage('Should have a valid array of URIs'), 36 .custom(areValidActorHandles).withMessage('Should have a valid array of URIs'),
42 37
43 (req: express.Request, res: express.Response, next: express.NextFunction) => { 38 (req: express.Request, res: express.Response, next: express.NextFunction) => {
44 logger.debug('Checking areSubscriptionsExistValidator parameters', { parameters: req.query })
45
46 if (areValidationErrors(req, res)) return 39 if (areValidationErrors(req, res)) return
47 40
48 return next() 41 return next()
@@ -54,8 +47,6 @@ const userSubscriptionGetValidator = [
54 .custom(isValidActorHandle), 47 .custom(isValidActorHandle),
55 48
56 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 49 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
57 logger.debug('Checking userSubscriptionGetValidator parameters', { parameters: req.params })
58
59 if (areValidationErrors(req, res)) return 50 if (areValidationErrors(req, res)) return
60 51
61 let [ name, host ] = req.params.uri.split('@') 52 let [ name, host ] = req.params.uri.split('@')