aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/follows.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-03 17:33:44 +0200
committerChocobozzz <me@florianbigard.com>2021-06-03 18:03:36 +0200
commit10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4 (patch)
tree008f8dad8032684f46105a261b27b2d6f05b36eb /server/middlewares/validators/follows.ts
parent5e08989ede1a340b9edb94465a11b1e04bf24094 (diff)
downloadPeerTube-10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4.tar.gz
PeerTube-10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4.tar.zst
PeerTube-10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4.zip
Move middleware utils in middlewares
helpers modules should not import models
Diffstat (limited to 'server/middlewares/validators/follows.ts')
-rw-r--r--server/middlewares/validators/follows.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts
index 733be379b..205baca48 100644
--- a/server/middlewares/validators/follows.ts
+++ b/server/middlewares/validators/follows.ts
@@ -1,6 +1,7 @@
1import * as express from 'express' 1import * as express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { isFollowStateValid } from '@server/helpers/custom-validators/follows' 3import { isFollowStateValid } from '@server/helpers/custom-validators/follows'
4import { loadActorUrlOrGetFromWebfinger } from '@server/lib/activitypub/actors'
4import { getServerActor } from '@server/models/application/application' 5import { getServerActor } from '@server/models/application/application'
5import { MActorFollowActorsDefault } from '@server/types/models' 6import { MActorFollowActorsDefault } from '@server/types/models'
6import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' 7import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
@@ -8,11 +9,10 @@ import { isTestInstance } from '../../helpers/core-utils'
8import { isActorTypeValid, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' 9import { isActorTypeValid, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor'
9import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers' 10import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers'
10import { logger } from '../../helpers/logger' 11import { logger } from '../../helpers/logger'
11import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger'
12import { SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants' 12import { SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants'
13import { ActorModel } from '../../models/actor/actor' 13import { ActorModel } from '../../models/actor/actor'
14import { ActorFollowModel } from '../../models/actor/actor-follow' 14import { ActorFollowModel } from '../../models/actor/actor-follow'
15import { areValidationErrors } from './utils' 15import { areValidationErrors } from './shared'
16 16
17const listFollowsValidator = [ 17const listFollowsValidator = [
18 query('state') 18 query('state')