diff options
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/activitypub.ts | 2 | ||||
-rw-r--r-- | server/middlewares/oauth.ts | 2 | ||||
-rw-r--r-- | server/middlewares/pagination.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/avatar.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/follows.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/sort.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-captions.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-channels.ts | 3 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-imports.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-playlists.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 2 |
11 files changed, 11 insertions, 12 deletions
diff --git a/server/middlewares/activitypub.ts b/server/middlewares/activitypub.ts index c528ee250..88cf342ee 100644 --- a/server/middlewares/activitypub.ts +++ b/server/middlewares/activitypub.ts | |||
@@ -2,7 +2,7 @@ import { NextFunction, Request, Response } from 'express' | |||
2 | import { ActivityPubSignature } from '../../shared' | 2 | import { ActivityPubSignature } from '../../shared' |
3 | import { logger } from '../helpers/logger' | 3 | import { logger } from '../helpers/logger' |
4 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../helpers/peertube-crypto' | 4 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../helpers/peertube-crypto' |
5 | import { ACCEPT_HEADERS, ACTIVITY_PUB, HTTP_SIGNATURE } from '../initializers' | 5 | import { ACCEPT_HEADERS, ACTIVITY_PUB, HTTP_SIGNATURE } from '../initializers/constants' |
6 | import { getOrCreateActorAndServerAndModel } from '../lib/activitypub' | 6 | import { getOrCreateActorAndServerAndModel } from '../lib/activitypub' |
7 | import { loadActorUrlOrGetFromWebfinger } from '../helpers/webfinger' | 7 | import { loadActorUrlOrGetFromWebfinger } from '../helpers/webfinger' |
8 | 8 | ||
diff --git a/server/middlewares/oauth.ts b/server/middlewares/oauth.ts index 1d193d467..de736e593 100644 --- a/server/middlewares/oauth.ts +++ b/server/middlewares/oauth.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import * as OAuthServer from 'express-oauth-server' | 2 | import * as OAuthServer from 'express-oauth-server' |
3 | import 'express-validator' | 3 | import 'express-validator' |
4 | import { OAUTH_LIFETIME } from '../initializers' | 4 | import { OAUTH_LIFETIME } from '../initializers/constants' |
5 | import { logger } from '../helpers/logger' | 5 | import { logger } from '../helpers/logger' |
6 | import { Socket } from 'socket.io' | 6 | import { Socket } from 'socket.io' |
7 | import { getAccessToken } from '../lib/oauth-model' | 7 | import { getAccessToken } from '../lib/oauth-model' |
diff --git a/server/middlewares/pagination.ts b/server/middlewares/pagination.ts index 9b497b19e..83304940f 100644 --- a/server/middlewares/pagination.ts +++ b/server/middlewares/pagination.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import 'express-validator' | 1 | import 'express-validator' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | 3 | ||
4 | import { PAGINATION } from '../initializers' | 4 | import { PAGINATION } from '../initializers/constants' |
5 | 5 | ||
6 | function setDefaultPagination (req: express.Request, res: express.Response, next: express.NextFunction) { | 6 | function setDefaultPagination (req: express.Request, res: express.Response, next: express.NextFunction) { |
7 | if (!req.query.start) req.query.start = 0 | 7 | if (!req.query.start) req.query.start = 0 |
diff --git a/server/middlewares/validators/avatar.ts b/server/middlewares/validators/avatar.ts index ddc14f531..bab3ed118 100644 --- a/server/middlewares/validators/avatar.ts +++ b/server/middlewares/validators/avatar.ts | |||
@@ -2,7 +2,7 @@ import * as express from 'express' | |||
2 | import { body } from 'express-validator/check' | 2 | import { body } from 'express-validator/check' |
3 | import { isAvatarFile } from '../../helpers/custom-validators/users' | 3 | import { isAvatarFile } from '../../helpers/custom-validators/users' |
4 | import { areValidationErrors } from './utils' | 4 | import { areValidationErrors } from './utils' |
5 | import { CONSTRAINTS_FIELDS } from '../../initializers' | 5 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' |
6 | import { logger } from '../../helpers/logger' | 6 | import { logger } from '../../helpers/logger' |
7 | import { cleanUpReqFiles } from '../../helpers/express-utils' | 7 | import { cleanUpReqFiles } from '../../helpers/express-utils' |
8 | 8 | ||
diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts index 5623b4ba6..2e5a02307 100644 --- a/server/middlewares/validators/follows.ts +++ b/server/middlewares/validators/follows.ts | |||
@@ -4,7 +4,7 @@ import { isTestInstance } from '../../helpers/core-utils' | |||
4 | import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers' | 4 | import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers' |
5 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
6 | import { getServerActor } from '../../helpers/utils' | 6 | import { getServerActor } from '../../helpers/utils' |
7 | import { SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers' | 7 | import { SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants' |
8 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' | 8 | 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' |
diff --git a/server/middlewares/validators/sort.ts b/server/middlewares/validators/sort.ts index 44295c325..b497798d1 100644 --- a/server/middlewares/validators/sort.ts +++ b/server/middlewares/validators/sort.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { SORTABLE_COLUMNS } from '../../initializers' | 1 | import { SORTABLE_COLUMNS } from '../../initializers/constants' |
2 | import { checkSort, createSortableColumns } from './utils' | 2 | import { checkSort, createSortableColumns } from './utils' |
3 | 3 | ||
4 | // Initialize constants here for better performances | 4 | // Initialize constants here for better performances |
diff --git a/server/middlewares/validators/videos/video-captions.ts b/server/middlewares/validators/videos/video-captions.ts index b2b259aff..d857ac3ec 100644 --- a/server/middlewares/validators/videos/video-captions.ts +++ b/server/middlewares/validators/videos/video-captions.ts | |||
@@ -3,7 +3,7 @@ import { areValidationErrors } from '../utils' | |||
3 | import { checkUserCanManageVideo, doesVideoExist } from '../../../helpers/custom-validators/videos' | 3 | import { checkUserCanManageVideo, doesVideoExist } from '../../../helpers/custom-validators/videos' |
4 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' | 4 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' |
5 | import { body, param } from 'express-validator/check' | 5 | import { body, param } from 'express-validator/check' |
6 | import { CONSTRAINTS_FIELDS } from '../../../initializers' | 6 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
7 | import { UserRight } from '../../../../shared' | 7 | import { UserRight } from '../../../../shared' |
8 | import { logger } from '../../../helpers/logger' | 8 | import { logger } from '../../../helpers/logger' |
9 | import { doesVideoCaptionExist, isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' | 9 | import { doesVideoCaptionExist, isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' |
diff --git a/server/middlewares/validators/videos/video-channels.ts b/server/middlewares/validators/videos/video-channels.ts index e2067c4d9..4b26f0bc4 100644 --- a/server/middlewares/validators/videos/video-channels.ts +++ b/server/middlewares/validators/videos/video-channels.ts | |||
@@ -1,12 +1,11 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { body, param } from 'express-validator/check' | 2 | import { body, param } from 'express-validator/check' |
3 | import { UserRight } from '../../../../shared' | 3 | import { UserRight } from '../../../../shared' |
4 | import { doesAccountNameWithHostExist } from '../../../helpers/custom-validators/accounts' | ||
5 | import { | 4 | import { |
6 | doesLocalVideoChannelNameExist, | 5 | doesLocalVideoChannelNameExist, |
6 | doesVideoChannelNameWithHostExist, | ||
7 | isVideoChannelDescriptionValid, | 7 | isVideoChannelDescriptionValid, |
8 | isVideoChannelNameValid, | 8 | isVideoChannelNameValid, |
9 | doesVideoChannelNameWithHostExist, | ||
10 | isVideoChannelSupportValid | 9 | isVideoChannelSupportValid |
11 | } from '../../../helpers/custom-validators/video-channels' | 10 | } from '../../../helpers/custom-validators/video-channels' |
12 | import { logger } from '../../../helpers/logger' | 11 | import { logger } from '../../../helpers/logger' |
diff --git a/server/middlewares/validators/videos/video-imports.ts b/server/middlewares/validators/videos/video-imports.ts index fb13f3ceb..452084a7c 100644 --- a/server/middlewares/validators/videos/video-imports.ts +++ b/server/middlewares/validators/videos/video-imports.ts | |||
@@ -8,7 +8,7 @@ import { isVideoImportTargetUrlValid, isVideoImportTorrentFile } from '../../../ | |||
8 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 8 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
9 | import { doesVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../../helpers/custom-validators/videos' | 9 | import { doesVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../../helpers/custom-validators/videos' |
10 | import { CONFIG } from '../../../initializers/config' | 10 | import { CONFIG } from '../../../initializers/config' |
11 | import { CONSTRAINTS_FIELDS } from '../../../initializers' | 11 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
12 | 12 | ||
13 | const videoImportAddValidator = getCommonVideoEditAttributes().concat([ | 13 | const videoImportAddValidator = getCommonVideoEditAttributes().concat([ |
14 | body('channelId') | 14 | body('channelId') |
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts index 6ba30fac9..2c3f7e542 100644 --- a/server/middlewares/validators/videos/video-playlists.ts +++ b/server/middlewares/validators/videos/video-playlists.ts | |||
@@ -5,7 +5,7 @@ import { logger } from '../../../helpers/logger' | |||
5 | import { UserModel } from '../../../models/account/user' | 5 | import { UserModel } from '../../../models/account/user' |
6 | import { areValidationErrors } from '../utils' | 6 | import { areValidationErrors } from '../utils' |
7 | import { doesVideoExist, isVideoImage } from '../../../helpers/custom-validators/videos' | 7 | import { doesVideoExist, isVideoImage } from '../../../helpers/custom-validators/videos' |
8 | import { CONSTRAINTS_FIELDS } from '../../../initializers' | 8 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
9 | import { isArrayOf, isIdOrUUIDValid, isIdValid, isUUIDValid, toIntArray, toValueOrNull } from '../../../helpers/custom-validators/misc' | 9 | import { isArrayOf, isIdOrUUIDValid, isIdValid, isUUIDValid, toIntArray, toValueOrNull } from '../../../helpers/custom-validators/misc' |
10 | import { | 10 | import { |
11 | doesVideoPlaylistExist, | 11 | doesVideoPlaylistExist, |
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 7ce1a922f..e9b036a02 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -32,7 +32,7 @@ import { | |||
32 | } from '../../../helpers/custom-validators/videos' | 32 | } from '../../../helpers/custom-validators/videos' |
33 | import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' | 33 | import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' |
34 | import { logger } from '../../../helpers/logger' | 34 | import { logger } from '../../../helpers/logger' |
35 | import { CONSTRAINTS_FIELDS } from '../../../initializers' | 35 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
36 | import { authenticatePromiseIfNeeded } from '../../oauth' | 36 | import { authenticatePromiseIfNeeded } from '../../oauth' |
37 | import { areValidationErrors } from '../utils' | 37 | import { areValidationErrors } from '../utils' |
38 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 38 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |