aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/avatar.ts2
-rw-r--r--server/middlewares/validators/follows.ts2
-rw-r--r--server/middlewares/validators/sort.ts2
-rw-r--r--server/middlewares/validators/videos/video-captions.ts2
-rw-r--r--server/middlewares/validators/videos/video-channels.ts3
-rw-r--r--server/middlewares/validators/videos/video-imports.ts2
-rw-r--r--server/middlewares/validators/videos/video-playlists.ts2
-rw-r--r--server/middlewares/validators/videos/videos.ts2
8 files changed, 8 insertions, 9 deletions
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'
2import { body } from 'express-validator/check' 2import { body } from 'express-validator/check'
3import { isAvatarFile } from '../../helpers/custom-validators/users' 3import { isAvatarFile } from '../../helpers/custom-validators/users'
4import { areValidationErrors } from './utils' 4import { areValidationErrors } from './utils'
5import { CONSTRAINTS_FIELDS } from '../../initializers' 5import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
6import { logger } from '../../helpers/logger' 6import { logger } from '../../helpers/logger'
7import { cleanUpReqFiles } from '../../helpers/express-utils' 7import { 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'
4import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers' 4import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers'
5import { logger } from '../../helpers/logger' 5import { logger } from '../../helpers/logger'
6import { getServerActor } from '../../helpers/utils' 6import { getServerActor } from '../../helpers/utils'
7import { SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers' 7import { SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants'
8import { ActorFollowModel } from '../../models/activitypub/actor-follow' 8import { ActorFollowModel } from '../../models/activitypub/actor-follow'
9import { areValidationErrors } from './utils' 9import { areValidationErrors } from './utils'
10import { ActorModel } from '../../models/activitypub/actor' 10import { 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 @@
1import { SORTABLE_COLUMNS } from '../../initializers' 1import { SORTABLE_COLUMNS } from '../../initializers/constants'
2import { checkSort, createSortableColumns } from './utils' 2import { 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'
3import { checkUserCanManageVideo, doesVideoExist } from '../../../helpers/custom-validators/videos' 3import { checkUserCanManageVideo, doesVideoExist } from '../../../helpers/custom-validators/videos'
4import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' 4import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc'
5import { body, param } from 'express-validator/check' 5import { body, param } from 'express-validator/check'
6import { CONSTRAINTS_FIELDS } from '../../../initializers' 6import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
7import { UserRight } from '../../../../shared' 7import { UserRight } from '../../../../shared'
8import { logger } from '../../../helpers/logger' 8import { logger } from '../../../helpers/logger'
9import { doesVideoCaptionExist, isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' 9import { 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 @@
1import * as express from 'express' 1import * as express from 'express'
2import { body, param } from 'express-validator/check' 2import { body, param } from 'express-validator/check'
3import { UserRight } from '../../../../shared' 3import { UserRight } from '../../../../shared'
4import { doesAccountNameWithHostExist } from '../../../helpers/custom-validators/accounts'
5import { 4import {
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'
12import { logger } from '../../../helpers/logger' 11import { 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 '../../../
8import { cleanUpReqFiles } from '../../../helpers/express-utils' 8import { cleanUpReqFiles } from '../../../helpers/express-utils'
9import { doesVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../../helpers/custom-validators/videos' 9import { doesVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../../helpers/custom-validators/videos'
10import { CONFIG } from '../../../initializers/config' 10import { CONFIG } from '../../../initializers/config'
11import { CONSTRAINTS_FIELDS } from '../../../initializers' 11import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
12 12
13const videoImportAddValidator = getCommonVideoEditAttributes().concat([ 13const 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'
5import { UserModel } from '../../../models/account/user' 5import { UserModel } from '../../../models/account/user'
6import { areValidationErrors } from '../utils' 6import { areValidationErrors } from '../utils'
7import { doesVideoExist, isVideoImage } from '../../../helpers/custom-validators/videos' 7import { doesVideoExist, isVideoImage } from '../../../helpers/custom-validators/videos'
8import { CONSTRAINTS_FIELDS } from '../../../initializers' 8import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
9import { isArrayOf, isIdOrUUIDValid, isIdValid, isUUIDValid, toIntArray, toValueOrNull } from '../../../helpers/custom-validators/misc' 9import { isArrayOf, isIdOrUUIDValid, isIdValid, isUUIDValid, toIntArray, toValueOrNull } from '../../../helpers/custom-validators/misc'
10import { 10import {
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'
33import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' 33import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils'
34import { logger } from '../../../helpers/logger' 34import { logger } from '../../../helpers/logger'
35import { CONSTRAINTS_FIELDS } from '../../../initializers' 35import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
36import { authenticatePromiseIfNeeded } from '../../oauth' 36import { authenticatePromiseIfNeeded } from '../../oauth'
37import { areValidationErrors } from '../utils' 37import { areValidationErrors } from '../utils'
38import { cleanUpReqFiles } from '../../../helpers/express-utils' 38import { cleanUpReqFiles } from '../../../helpers/express-utils'