aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/auth.ts2
-rw-r--r--server/middlewares/cache/shared/api-cache.ts2
-rw-r--r--server/middlewares/csp.ts6
-rw-r--r--server/middlewares/doc.ts2
-rw-r--r--server/middlewares/error.ts2
-rw-r--r--server/middlewares/pagination.ts2
-rw-r--r--server/middlewares/servers.ts2
-rw-r--r--server/middlewares/sort.ts2
-rw-r--r--server/middlewares/user-right.ts2
-rw-r--r--server/middlewares/validators/abuse.ts2
-rw-r--r--server/middlewares/validators/account.ts2
-rw-r--r--server/middlewares/validators/activitypub/activity.ts2
-rw-r--r--server/middlewares/validators/activitypub/pagination.ts2
-rw-r--r--server/middlewares/validators/activitypub/signature.ts2
-rw-r--r--server/middlewares/validators/actor-image.ts2
-rw-r--r--server/middlewares/validators/blocklist.ts2
-rw-r--r--server/middlewares/validators/bulk.ts2
-rw-r--r--server/middlewares/validators/config.ts2
-rw-r--r--server/middlewares/validators/feeds.ts2
-rw-r--r--server/middlewares/validators/follows.ts2
-rw-r--r--server/middlewares/validators/jobs.ts2
-rw-r--r--server/middlewares/validators/logs.ts2
-rw-r--r--server/middlewares/validators/oembed.ts2
-rw-r--r--server/middlewares/validators/pagination.ts2
-rw-r--r--server/middlewares/validators/plugins.ts2
-rw-r--r--server/middlewares/validators/redundancy.ts2
-rw-r--r--server/middlewares/validators/search.ts2
-rw-r--r--server/middlewares/validators/server.ts2
-rw-r--r--server/middlewares/validators/shared/utils.ts2
-rw-r--r--server/middlewares/validators/shared/video-channels.ts2
-rw-r--r--server/middlewares/validators/shared/video-comments.ts2
-rw-r--r--server/middlewares/validators/shared/video-imports.ts2
-rw-r--r--server/middlewares/validators/shared/video-ownerships.ts2
-rw-r--r--server/middlewares/validators/shared/video-playlists.ts2
-rw-r--r--server/middlewares/validators/themes.ts2
-rw-r--r--server/middlewares/validators/user-history.ts2
-rw-r--r--server/middlewares/validators/user-notifications.ts2
-rw-r--r--server/middlewares/validators/user-subscriptions.ts2
-rw-r--r--server/middlewares/validators/users.ts2
-rw-r--r--server/middlewares/validators/videos/video-blacklist.ts2
-rw-r--r--server/middlewares/validators/videos/video-captions.ts2
-rw-r--r--server/middlewares/validators/videos/video-channels.ts2
-rw-r--r--server/middlewares/validators/videos/video-comments.ts2
-rw-r--r--server/middlewares/validators/videos/video-imports.ts2
-rw-r--r--server/middlewares/validators/videos/video-live.ts2
-rw-r--r--server/middlewares/validators/videos/video-ownership-changes.ts2
-rw-r--r--server/middlewares/validators/videos/video-playlists.ts2
-rw-r--r--server/middlewares/validators/videos/video-rates.ts2
-rw-r--r--server/middlewares/validators/videos/video-shares.ts2
-rw-r--r--server/middlewares/validators/videos/video-watch.ts2
-rw-r--r--server/middlewares/validators/videos/videos.ts2
-rw-r--r--server/middlewares/validators/webfinger.ts2
52 files changed, 54 insertions, 54 deletions
diff --git a/server/middlewares/auth.ts b/server/middlewares/auth.ts
index 9e6327b23..c5424be97 100644
--- a/server/middlewares/auth.ts
+++ b/server/middlewares/auth.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { Socket } from 'socket.io' 2import { Socket } from 'socket.io'
3import { getAccessToken } from '@server/lib/auth/oauth-model' 3import { getAccessToken } from '@server/lib/auth/oauth-model'
4import { HttpStatusCode } from '../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
diff --git a/server/middlewares/cache/shared/api-cache.ts b/server/middlewares/cache/shared/api-cache.ts
index f9f7b1b67..f8846dcfc 100644
--- a/server/middlewares/cache/shared/api-cache.ts
+++ b/server/middlewares/cache/shared/api-cache.ts
@@ -1,7 +1,7 @@
1// Thanks: https://github.com/kwhitley/apicache 1// Thanks: https://github.com/kwhitley/apicache
2// We duplicated the library because it is unmaintened and prevent us to upgrade to recent NodeJS versions 2// We duplicated the library because it is unmaintened and prevent us to upgrade to recent NodeJS versions
3 3
4import * as express from 'express' 4import express from 'express'
5import { OutgoingHttpHeaders } from 'http' 5import { OutgoingHttpHeaders } from 'http'
6import { isTestInstance, parseDurationToMs } from '@server/helpers/core-utils' 6import { isTestInstance, parseDurationToMs } from '@server/helpers/core-utils'
7import { logger } from '@server/helpers/logger' 7import { logger } from '@server/helpers/logger'
diff --git a/server/middlewares/csp.ts b/server/middlewares/csp.ts
index 0ee44bf47..e2a75a17e 100644
--- a/server/middlewares/csp.ts
+++ b/server/middlewares/csp.ts
@@ -1,4 +1,4 @@
1import * as helmet from 'helmet' 1import { contentSecurityPolicy } from 'helmet'
2import { CONFIG } from '../initializers/config' 2import { CONFIG } from '../initializers/config'
3 3
4const baseDirectives = Object.assign({}, 4const baseDirectives = Object.assign({},
@@ -22,12 +22,12 @@ const baseDirectives = Object.assign({},
22 CONFIG.WEBSERVER.SCHEME === 'https' ? { upgradeInsecureRequests: [] } : {} 22 CONFIG.WEBSERVER.SCHEME === 'https' ? { upgradeInsecureRequests: [] } : {}
23) 23)
24 24
25const baseCSP = helmet.contentSecurityPolicy({ 25const baseCSP = contentSecurityPolicy({
26 directives: baseDirectives, 26 directives: baseDirectives,
27 reportOnly: CONFIG.CSP.REPORT_ONLY 27 reportOnly: CONFIG.CSP.REPORT_ONLY
28}) 28})
29 29
30const embedCSP = helmet.contentSecurityPolicy({ 30const embedCSP = contentSecurityPolicy({
31 directives: Object.assign({}, baseDirectives, { frameAncestors: [ '*' ] }), 31 directives: Object.assign({}, baseDirectives, { frameAncestors: [ '*' ] }),
32 reportOnly: CONFIG.CSP.REPORT_ONLY 32 reportOnly: CONFIG.CSP.REPORT_ONLY
33}) 33})
diff --git a/server/middlewares/doc.ts b/server/middlewares/doc.ts
index 3db85c68d..eef76acaa 100644
--- a/server/middlewares/doc.ts
+++ b/server/middlewares/doc.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2 2
3function openapiOperationDoc (options: { 3function openapiOperationDoc (options: {
4 url?: string 4 url?: string
diff --git a/server/middlewares/error.ts b/server/middlewares/error.ts
index af5a9c29a..6c52ce7bd 100644
--- a/server/middlewares/error.ts
+++ b/server/middlewares/error.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { ProblemDocument, ProblemDocumentExtension } from 'http-problem-details' 2import { ProblemDocument, ProblemDocumentExtension } from 'http-problem-details'
3import { HttpStatusCode } from '@shared/models' 3import { HttpStatusCode } from '@shared/models'
4 4
diff --git a/server/middlewares/pagination.ts b/server/middlewares/pagination.ts
index b59717d7b..9812af9e4 100644
--- a/server/middlewares/pagination.ts
+++ b/server/middlewares/pagination.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { PAGINATION } from '../initializers/constants' 2import { PAGINATION } from '../initializers/constants'
3 3
4function setDefaultPagination (req: express.Request, res: express.Response, next: express.NextFunction) { 4function setDefaultPagination (req: express.Request, res: express.Response, next: express.NextFunction) {
diff --git a/server/middlewares/servers.ts b/server/middlewares/servers.ts
index cf70d901e..ebfa03e6c 100644
--- a/server/middlewares/servers.ts
+++ b/server/middlewares/servers.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { HttpStatusCode } from '../../shared/models/http/http-error-codes' 2import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
3import { getHostWithPort } from '../helpers/express-utils' 3import { getHostWithPort } from '../helpers/express-utils'
4 4
diff --git a/server/middlewares/sort.ts b/server/middlewares/sort.ts
index 0600ccd15..458895898 100644
--- a/server/middlewares/sort.ts
+++ b/server/middlewares/sort.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { SortType } from '../models/utils' 2import { SortType } from '../models/utils'
3 3
4const setDefaultSort = setDefaultSortFactory('-createdAt') 4const setDefaultSort = setDefaultSortFactory('-createdAt')
diff --git a/server/middlewares/user-right.ts b/server/middlewares/user-right.ts
index c8c694f05..ea95b16c2 100644
--- a/server/middlewares/user-right.ts
+++ b/server/middlewares/user-right.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { UserRight } from '../../shared' 2import { UserRight } from '../../shared'
3import { HttpStatusCode } from '../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
4import { logger } from '../helpers/logger' 4import { logger } from '../helpers/logger'
diff --git a/server/middlewares/validators/abuse.ts b/server/middlewares/validators/abuse.ts
index f4d9c3af2..22f66c8cf 100644
--- a/server/middlewares/validators/abuse.ts
+++ b/server/middlewares/validators/abuse.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { 3import {
4 areAbusePredefinedReasonsValid, 4 areAbusePredefinedReasonsValid,
diff --git a/server/middlewares/validators/account.ts b/server/middlewares/validators/account.ts
index 599eb10bb..e529c831d 100644
--- a/server/middlewares/validators/account.ts
+++ b/server/middlewares/validators/account.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { param } from 'express-validator' 2import { param } from 'express-validator'
3import { isAccountNameValid } from '../../helpers/custom-validators/accounts' 3import { isAccountNameValid } from '../../helpers/custom-validators/accounts'
4import { logger } from '../../helpers/logger' 4import { logger } from '../../helpers/logger'
diff --git a/server/middlewares/validators/activitypub/activity.ts b/server/middlewares/validators/activitypub/activity.ts
index d24e4427b..e296b8be7 100644
--- a/server/middlewares/validators/activitypub/activity.ts
+++ b/server/middlewares/validators/activitypub/activity.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { getServerActor } from '@server/models/application/application' 2import { getServerActor } from '@server/models/application/application'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { isRootActivityValid } from '../../../helpers/custom-validators/activitypub/activity' 4import { isRootActivityValid } from '../../../helpers/custom-validators/activitypub/activity'
diff --git a/server/middlewares/validators/activitypub/pagination.ts b/server/middlewares/validators/activitypub/pagination.ts
index c8ec34eb6..c542d4173 100644
--- a/server/middlewares/validators/activitypub/pagination.ts
+++ b/server/middlewares/validators/activitypub/pagination.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { query } from 'express-validator' 2import { query } from 'express-validator'
3import { PAGINATION } from '@server/initializers/constants' 3import { PAGINATION } from '@server/initializers/constants'
4import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
diff --git a/server/middlewares/validators/activitypub/signature.ts b/server/middlewares/validators/activitypub/signature.ts
index f2f7d5848..642bcefe0 100644
--- a/server/middlewares/validators/activitypub/signature.ts
+++ b/server/middlewares/validators/activitypub/signature.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { 3import {
4 isSignatureCreatorValid, 4 isSignatureCreatorValid,
diff --git a/server/middlewares/validators/actor-image.ts b/server/middlewares/validators/actor-image.ts
index 49daadd61..c7e9f391c 100644
--- a/server/middlewares/validators/actor-image.ts
+++ b/server/middlewares/validators/actor-image.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { isActorImageFile } from '@server/helpers/custom-validators/actor-images' 3import { isActorImageFile } from '@server/helpers/custom-validators/actor-images'
4import { cleanUpReqFiles } from '../../helpers/express-utils' 4import { cleanUpReqFiles } from '../../helpers/express-utils'
diff --git a/server/middlewares/validators/blocklist.ts b/server/middlewares/validators/blocklist.ts
index f15b293e9..b7749e204 100644
--- a/server/middlewares/validators/blocklist.ts
+++ b/server/middlewares/validators/blocklist.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param } from 'express-validator' 2import { body, param } from 'express-validator'
3import { getServerActor } from '@server/models/application/application' 3import { getServerActor } from '@server/models/application/application'
4import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
diff --git a/server/middlewares/validators/bulk.ts b/server/middlewares/validators/bulk.ts
index 6fec58149..1cfc7481e 100644
--- a/server/middlewares/validators/bulk.ts
+++ b/server/middlewares/validators/bulk.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { isBulkRemoveCommentsOfScopeValid } from '@server/helpers/custom-validators/bulk' 3import { isBulkRemoveCommentsOfScopeValid } from '@server/helpers/custom-validators/bulk'
4import { HttpStatusCode, UserRight } from '@shared/models' 4import { HttpStatusCode, UserRight } from '@shared/models'
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts
index 1aeadbe65..16a840667 100644
--- a/server/middlewares/validators/config.ts
+++ b/server/middlewares/validators/config.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { isIntOrNull } from '@server/helpers/custom-validators/misc' 3import { isIntOrNull } from '@server/helpers/custom-validators/misc'
4import { isEmailEnabled } from '@server/initializers/config' 4import { isEmailEnabled } from '@server/initializers/config'
diff --git a/server/middlewares/validators/feeds.ts b/server/middlewares/validators/feeds.ts
index d29bebf64..f8ebaf6ed 100644
--- a/server/middlewares/validators/feeds.ts
+++ b/server/middlewares/validators/feeds.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { param, query } from 'express-validator' 2import { param, query } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { isValidRSSFeed } from '../../helpers/custom-validators/feeds' 4import { isValidRSSFeed } from '../../helpers/custom-validators/feeds'
diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts
index 16abdd096..df4cefe28 100644
--- a/server/middlewares/validators/follows.ts
+++ b/server/middlewares/validators/follows.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { isEachUniqueHandleValid, isFollowStateValid, isRemoteHandleValid } from '@server/helpers/custom-validators/follows' 3import { isEachUniqueHandleValid, isFollowStateValid, isRemoteHandleValid } from '@server/helpers/custom-validators/follows'
4import { loadActorUrlOrGetFromWebfinger } from '@server/lib/activitypub/actors' 4import { loadActorUrlOrGetFromWebfinger } from '@server/lib/activitypub/actors'
diff --git a/server/middlewares/validators/jobs.ts b/server/middlewares/validators/jobs.ts
index 5d89d167f..4de90548b 100644
--- a/server/middlewares/validators/jobs.ts
+++ b/server/middlewares/validators/jobs.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { param, query } from 'express-validator' 2import { param, query } from 'express-validator'
3import { isValidJobState, isValidJobType } from '../../helpers/custom-validators/jobs' 3import { isValidJobState, isValidJobType } from '../../helpers/custom-validators/jobs'
4import { logger, loggerTagsFactory } from '../../helpers/logger' 4import { logger, loggerTagsFactory } from '../../helpers/logger'
diff --git a/server/middlewares/validators/logs.ts b/server/middlewares/validators/logs.ts
index c55baaee3..03c1c4df1 100644
--- a/server/middlewares/validators/logs.ts
+++ b/server/middlewares/validators/logs.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { query } from 'express-validator' 2import { query } from 'express-validator'
3import { isValidLogLevel } from '../../helpers/custom-validators/logs' 3import { isValidLogLevel } from '../../helpers/custom-validators/logs'
4import { isDateValid } from '../../helpers/custom-validators/misc' 4import { isDateValid } from '../../helpers/custom-validators/misc'
diff --git a/server/middlewares/validators/oembed.ts b/server/middlewares/validators/oembed.ts
index e5fc0c277..5e47211b5 100644
--- a/server/middlewares/validators/oembed.ts
+++ b/server/middlewares/validators/oembed.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { query } from 'express-validator' 2import { query } from 'express-validator'
3import { join } from 'path' 3import { join } from 'path'
4import { loadVideo } from '@server/lib/model-loaders' 4import { loadVideo } from '@server/lib/model-loaders'
diff --git a/server/middlewares/validators/pagination.ts b/server/middlewares/validators/pagination.ts
index 74eae251e..8e4922b9d 100644
--- a/server/middlewares/validators/pagination.ts
+++ b/server/middlewares/validators/pagination.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { query } from 'express-validator' 2import { query } from 'express-validator'
3import { PAGINATION } from '@server/initializers/constants' 3import { PAGINATION } from '@server/initializers/constants'
4import { logger } from '../../helpers/logger' 4import { logger } from '../../helpers/logger'
diff --git a/server/middlewares/validators/plugins.ts b/server/middlewares/validators/plugins.ts
index 3fb2176b9..21171af23 100644
--- a/server/middlewares/validators/plugins.ts
+++ b/server/middlewares/validators/plugins.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query, ValidationChain } from 'express-validator' 2import { body, param, query, ValidationChain } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { PluginType } from '../../../shared/models/plugins/plugin.type' 4import { PluginType } from '../../../shared/models/plugins/plugin.type'
diff --git a/server/middlewares/validators/redundancy.ts b/server/middlewares/validators/redundancy.ts
index f1b2ff5cd..d31b216f5 100644
--- a/server/middlewares/validators/redundancy.ts
+++ b/server/middlewares/validators/redundancy.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { isVideoRedundancyTarget } from '@server/helpers/custom-validators/video-redundancies' 3import { isVideoRedundancyTarget } from '@server/helpers/custom-validators/video-redundancies'
4import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
diff --git a/server/middlewares/validators/search.ts b/server/middlewares/validators/search.ts
index 27d0e541d..e6ec8642a 100644
--- a/server/middlewares/validators/search.ts
+++ b/server/middlewares/validators/search.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { query } from 'express-validator' 2import { query } from 'express-validator'
3import { isSearchTargetValid } from '@server/helpers/custom-validators/search' 3import { isSearchTargetValid } from '@server/helpers/custom-validators/search'
4import { isHostValid } from '@server/helpers/custom-validators/servers' 4import { isHostValid } from '@server/helpers/custom-validators/servers'
diff --git a/server/middlewares/validators/server.ts b/server/middlewares/validators/server.ts
index 29fdc13d2..10bbefe38 100644
--- a/server/middlewares/validators/server.ts
+++ b/server/middlewares/validators/server.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { isHostValid, isValidContactBody } from '../../helpers/custom-validators/servers' 4import { isHostValid, isValidContactBody } from '../../helpers/custom-validators/servers'
diff --git a/server/middlewares/validators/shared/utils.ts b/server/middlewares/validators/shared/utils.ts
index 4f08560af..5c66ad500 100644
--- a/server/middlewares/validators/shared/utils.ts
+++ b/server/middlewares/validators/shared/utils.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { param, query, validationResult } from 'express-validator' 2import { param, query, validationResult } from 'express-validator'
3import { isIdOrUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc' 3import { isIdOrUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc'
4import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
diff --git a/server/middlewares/validators/shared/video-channels.ts b/server/middlewares/validators/shared/video-channels.ts
index 3fc3d012a..7c0c89267 100644
--- a/server/middlewares/validators/shared/video-channels.ts
+++ b/server/middlewares/validators/shared/video-channels.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { VideoChannelModel } from '@server/models/video/video-channel' 2import { VideoChannelModel } from '@server/models/video/video-channel'
3import { MChannelBannerAccountDefault } from '@server/types/models' 3import { MChannelBannerAccountDefault } from '@server/types/models'
4import { HttpStatusCode } from '@shared/models' 4import { HttpStatusCode } from '@shared/models'
diff --git a/server/middlewares/validators/shared/video-comments.ts b/server/middlewares/validators/shared/video-comments.ts
index 60132fb6e..386ae911f 100644
--- a/server/middlewares/validators/shared/video-comments.ts
+++ b/server/middlewares/validators/shared/video-comments.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { VideoCommentModel } from '@server/models/video/video-comment' 2import { VideoCommentModel } from '@server/models/video/video-comment'
3import { MVideoId } from '@server/types/models' 3import { MVideoId } from '@server/types/models'
4import { HttpStatusCode } from '@shared/models' 4import { HttpStatusCode } from '@shared/models'
diff --git a/server/middlewares/validators/shared/video-imports.ts b/server/middlewares/validators/shared/video-imports.ts
index 50b49ffcb..69fda4b32 100644
--- a/server/middlewares/validators/shared/video-imports.ts
+++ b/server/middlewares/validators/shared/video-imports.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { VideoImportModel } from '@server/models/video/video-import' 2import { VideoImportModel } from '@server/models/video/video-import'
3import { HttpStatusCode } from '@shared/models' 3import { HttpStatusCode } from '@shared/models'
4 4
diff --git a/server/middlewares/validators/shared/video-ownerships.ts b/server/middlewares/validators/shared/video-ownerships.ts
index 93a23ef40..680613cda 100644
--- a/server/middlewares/validators/shared/video-ownerships.ts
+++ b/server/middlewares/validators/shared/video-ownerships.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' 2import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
3import { HttpStatusCode } from '@shared/models' 3import { HttpStatusCode } from '@shared/models'
4 4
diff --git a/server/middlewares/validators/shared/video-playlists.ts b/server/middlewares/validators/shared/video-playlists.ts
index 3f6768179..4342fe552 100644
--- a/server/middlewares/validators/shared/video-playlists.ts
+++ b/server/middlewares/validators/shared/video-playlists.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { VideoPlaylistModel } from '@server/models/video/video-playlist' 2import { VideoPlaylistModel } from '@server/models/video/video-playlist'
3import { MVideoPlaylist } from '@server/types/models' 3import { MVideoPlaylist } from '@server/types/models'
4import { HttpStatusCode } from '@shared/models' 4import { HttpStatusCode } from '@shared/models'
diff --git a/server/middlewares/validators/themes.ts b/server/middlewares/validators/themes.ts
index 2953b9505..7b9fee858 100644
--- a/server/middlewares/validators/themes.ts
+++ b/server/middlewares/validators/themes.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { param } from 'express-validator' 2import { param } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { isSafePath } from '../../helpers/custom-validators/misc' 4import { isSafePath } from '../../helpers/custom-validators/misc'
diff --git a/server/middlewares/validators/user-history.ts b/server/middlewares/validators/user-history.ts
index 1db0d9b26..f9be26627 100644
--- a/server/middlewares/validators/user-history.ts
+++ b/server/middlewares/validators/user-history.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, query } from 'express-validator' 2import { body, query } from 'express-validator'
3import { exists, isDateValid } from '../../helpers/custom-validators/misc' 3import { exists, isDateValid } from '../../helpers/custom-validators/misc'
4import { logger } from '../../helpers/logger' 4import { logger } from '../../helpers/logger'
diff --git a/server/middlewares/validators/user-notifications.ts b/server/middlewares/validators/user-notifications.ts
index 2f8e7686e..4a7577d32 100644
--- a/server/middlewares/validators/user-notifications.ts
+++ b/server/middlewares/validators/user-notifications.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, query } from 'express-validator' 2import { body, query } from 'express-validator'
3import { isNotEmptyIntArray, toBooleanOrNull } from '../../helpers/custom-validators/misc' 3import { isNotEmptyIntArray, toBooleanOrNull } from '../../helpers/custom-validators/misc'
4import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications' 4import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications'
diff --git a/server/middlewares/validators/user-subscriptions.ts b/server/middlewares/validators/user-subscriptions.ts
index df5777771..48ce90d7b 100644
--- a/server/middlewares/validators/user-subscriptions.ts
+++ b/server/middlewares/validators/user-subscriptions.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' 4import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor'
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index c6977fcd9..c06b85862 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { omit } from 'lodash' 3import { omit } from 'lodash'
4import { Hooks } from '@server/lib/plugins/hooks' 4import { Hooks } from '@server/lib/plugins/hooks'
diff --git a/server/middlewares/validators/videos/video-blacklist.ts b/server/middlewares/validators/videos/video-blacklist.ts
index 3a4937b7b..de11e69f2 100644
--- a/server/middlewares/validators/videos/video-blacklist.ts
+++ b/server/middlewares/validators/videos/video-blacklist.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, query } from 'express-validator' 2import { body, query } from 'express-validator'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { isBooleanValid, toBooleanOrNull, toIntOrNull } from '../../../helpers/custom-validators/misc' 4import { isBooleanValid, toBooleanOrNull, toIntOrNull } from '../../../helpers/custom-validators/misc'
diff --git a/server/middlewares/validators/videos/video-captions.ts b/server/middlewares/validators/videos/video-captions.ts
index 6bc127e01..38321ccf9 100644
--- a/server/middlewares/validators/videos/video-captions.ts
+++ b/server/middlewares/validators/videos/video-captions.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param } from 'express-validator' 2import { body, param } from 'express-validator'
3import { UserRight } from '../../../../shared' 3import { UserRight } from '../../../../shared'
4import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' 4import { 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 3b5693d23..fc717abf6 100644
--- a/server/middlewares/validators/videos/video-channels.ts
+++ b/server/middlewares/validators/videos/video-channels.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { VIDEO_CHANNELS } from '@server/initializers/constants' 3import { VIDEO_CHANNELS } from '@server/initializers/constants'
4import { MChannelAccountDefault, MUser } from '@server/types/models' 4import { MChannelAccountDefault, MUser } from '@server/types/models'
diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts
index 61c2ed92f..3ea8bdcbb 100644
--- a/server/middlewares/validators/videos/video-comments.ts
+++ b/server/middlewares/validators/videos/video-comments.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { MUserAccountUrl } from '@server/types/models' 3import { MUserAccountUrl } from '@server/types/models'
4import { UserRight } from '../../../../shared' 4import { UserRight } from '../../../../shared'
diff --git a/server/middlewares/validators/videos/video-imports.ts b/server/middlewares/validators/videos/video-imports.ts
index 52b839e56..640139c73 100644
--- a/server/middlewares/validators/videos/video-imports.ts
+++ b/server/middlewares/validators/videos/video-imports.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { isPreImportVideoAccepted } from '@server/lib/moderation' 3import { isPreImportVideoAccepted } from '@server/lib/moderation'
4import { Hooks } from '@server/lib/plugins/hooks' 4import { Hooks } from '@server/lib/plugins/hooks'
diff --git a/server/middlewares/validators/videos/video-live.ts b/server/middlewares/validators/videos/video-live.ts
index 97e8b4510..6c7601e05 100644
--- a/server/middlewares/validators/videos/video-live.ts
+++ b/server/middlewares/validators/videos/video-live.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { CONSTRAINTS_FIELDS } from '@server/initializers/constants' 3import { CONSTRAINTS_FIELDS } from '@server/initializers/constants'
4import { isLocalLiveVideoAccepted } from '@server/lib/moderation' 4import { isLocalLiveVideoAccepted } from '@server/lib/moderation'
diff --git a/server/middlewares/validators/videos/video-ownership-changes.ts b/server/middlewares/validators/videos/video-ownership-changes.ts
index a7f0b72c3..95e4cebce 100644
--- a/server/middlewares/validators/videos/video-ownership-changes.ts
+++ b/server/middlewares/validators/videos/video-ownership-changes.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { param } from 'express-validator' 2import { param } from 'express-validator'
3import { isIdValid } from '@server/helpers/custom-validators/misc' 3import { isIdValid } from '@server/helpers/custom-validators/misc'
4import { checkUserCanTerminateOwnershipChange } from '@server/helpers/custom-validators/video-ownership' 4import { checkUserCanTerminateOwnershipChange } from '@server/helpers/custom-validators/video-ownership'
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts
index ab84b4814..8f5c75fd5 100644
--- a/server/middlewares/validators/videos/video-playlists.ts
+++ b/server/middlewares/validators/videos/video-playlists.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query, ValidationChain } from 'express-validator' 2import { body, param, query, ValidationChain } from 'express-validator'
3import { ExpressPromiseHandler } from '@server/types/express' 3import { ExpressPromiseHandler } from '@server/types/express'
4import { MUserAccountId } from '@server/types/models' 4import { MUserAccountId } from '@server/types/models'
diff --git a/server/middlewares/validators/videos/video-rates.ts b/server/middlewares/validators/videos/video-rates.ts
index 5fe78b39e..6e0bb0ad1 100644
--- a/server/middlewares/validators/videos/video-rates.ts
+++ b/server/middlewares/validators/videos/video-rates.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { VideoRateType } from '../../../../shared/models/videos' 4import { VideoRateType } from '../../../../shared/models/videos'
diff --git a/server/middlewares/validators/videos/video-shares.ts b/server/middlewares/validators/videos/video-shares.ts
index 3b8d61768..0f04032bb 100644
--- a/server/middlewares/validators/videos/video-shares.ts
+++ b/server/middlewares/validators/videos/video-shares.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { param } from 'express-validator' 2import { param } from 'express-validator'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { isIdValid } from '../../../helpers/custom-validators/misc' 4import { isIdValid } from '../../../helpers/custom-validators/misc'
diff --git a/server/middlewares/validators/videos/video-watch.ts b/server/middlewares/validators/videos/video-watch.ts
index 431515eb1..d83710a64 100644
--- a/server/middlewares/validators/videos/video-watch.ts
+++ b/server/middlewares/validators/videos/video-watch.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { toIntOrNull } from '../../../helpers/custom-validators/misc' 4import { toIntOrNull } from '../../../helpers/custom-validators/misc'
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index 13187f398..23ee9778a 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { body, header, param, query, ValidationChain } from 'express-validator' 2import { body, header, param, query, ValidationChain } from 'express-validator'
3import { getResumableUploadPath } from '@server/helpers/upload' 3import { getResumableUploadPath } from '@server/helpers/upload'
4import { isAbleToUploadVideo } from '@server/lib/user' 4import { isAbleToUploadVideo } from '@server/lib/user'
diff --git a/server/middlewares/validators/webfinger.ts b/server/middlewares/validators/webfinger.ts
index 131360820..8893a0c7e 100644
--- a/server/middlewares/validators/webfinger.ts
+++ b/server/middlewares/validators/webfinger.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { query } from 'express-validator' 2import { query } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
4import { isWebfingerLocalResourceValid } from '../../helpers/custom-validators/webfinger' 4import { isWebfingerLocalResourceValid } from '../../helpers/custom-validators/webfinger'