aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/follows.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/follows.ts')
-rw-r--r--server/middlewares/validators/follows.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts
index 023dba5b5..639c60c03 100644
--- a/server/middlewares/validators/follows.ts
+++ b/server/middlewares/validators/follows.ts
@@ -19,10 +19,10 @@ import { areValidationErrors } from './shared'
19const listFollowsValidator = [ 19const listFollowsValidator = [
20 query('state') 20 query('state')
21 .optional() 21 .optional()
22 .custom(isFollowStateValid).withMessage('Should have a valid follow state'), 22 .custom(isFollowStateValid),
23 query('actorType') 23 query('actorType')
24 .optional() 24 .optional()
25 .custom(isActorTypeValid).withMessage('Should have a valid actor type'), 25 .custom(isActorTypeValid),
26 26
27 (req: express.Request, res: express.Response, next: express.NextFunction) => { 27 (req: express.Request, res: express.Response, next: express.NextFunction) => {
28 if (areValidationErrors(req, res)) return 28 if (areValidationErrors(req, res)) return
@@ -70,8 +70,7 @@ const followValidator = [
70 70
71const removeFollowingValidator = [ 71const removeFollowingValidator = [
72 param('hostOrHandle') 72 param('hostOrHandle')
73 .custom(value => isHostValid(value) || isRemoteHandleValid(value)) 73 .custom(value => isHostValid(value) || isRemoteHandleValid(value)),
74 .withMessage('Should have a valid host/handle'),
75 74
76 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 75 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
77 logger.debug('Checking unfollowing parameters', { parameters: req.params }) 76 logger.debug('Checking unfollowing parameters', { parameters: req.params })
@@ -100,7 +99,8 @@ const removeFollowingValidator = [
100] 99]
101 100
102const getFollowerValidator = [ 101const getFollowerValidator = [
103 param('nameWithHost').custom(isValidActorHandle).withMessage('Should have a valid nameWithHost'), 102 param('nameWithHost')
103 .custom(isValidActorHandle),
104 104
105 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 105 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
106 logger.debug('Checking get follower parameters', { parameters: req.params }) 106 logger.debug('Checking get follower parameters', { parameters: req.params })