diff options
Diffstat (limited to 'server/middlewares/validators/follows.ts')
-rw-r--r-- | server/middlewares/validators/follows.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts index 454f9f2b8..a98d32d86 100644 --- a/server/middlewares/validators/follows.ts +++ b/server/middlewares/validators/follows.ts | |||
@@ -9,7 +9,7 @@ import { ActorFollowModel } from '../../models/activitypub/actor-follow' | |||
9 | import { areValidationErrors } from './utils' | 9 | import { areValidationErrors } from './utils' |
10 | import { ActorModel } from '../../models/activitypub/actor' | 10 | import { ActorModel } from '../../models/activitypub/actor' |
11 | import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' | 11 | import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' |
12 | import { isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' | 12 | import { isActorTypeValid, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' |
13 | import { MActorFollowActorsDefault } from '@server/typings/models' | 13 | import { MActorFollowActorsDefault } from '@server/typings/models' |
14 | import { isFollowStateValid } from '@server/helpers/custom-validators/follows' | 14 | import { isFollowStateValid } from '@server/helpers/custom-validators/follows' |
15 | 15 | ||
@@ -17,6 +17,9 @@ const listFollowsValidator = [ | |||
17 | query('state') | 17 | query('state') |
18 | .optional() | 18 | .optional() |
19 | .custom(isFollowStateValid).withMessage('Should have a valid follow state'), | 19 | .custom(isFollowStateValid).withMessage('Should have a valid follow state'), |
20 | query('actorType') | ||
21 | .optional() | ||
22 | .custom(isActorTypeValid).withMessage('Should have a valid actor type'), | ||
20 | 23 | ||
21 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 24 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
22 | if (areValidationErrors(req, res)) return | 25 | if (areValidationErrors(req, res)) return |