From 41fb13c330de629df2d23379209e79c7af0f2e9a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Aug 2021 14:32:44 +0200 Subject: esModuleInterop to true --- server/middlewares/auth.ts | 2 +- server/middlewares/cache/shared/api-cache.ts | 2 +- server/middlewares/csp.ts | 6 +++--- server/middlewares/doc.ts | 2 +- server/middlewares/error.ts | 2 +- server/middlewares/pagination.ts | 2 +- server/middlewares/servers.ts | 2 +- server/middlewares/sort.ts | 2 +- server/middlewares/user-right.ts | 2 +- server/middlewares/validators/abuse.ts | 2 +- server/middlewares/validators/account.ts | 2 +- server/middlewares/validators/activitypub/activity.ts | 2 +- server/middlewares/validators/activitypub/pagination.ts | 2 +- server/middlewares/validators/activitypub/signature.ts | 2 +- server/middlewares/validators/actor-image.ts | 2 +- server/middlewares/validators/blocklist.ts | 2 +- server/middlewares/validators/bulk.ts | 2 +- server/middlewares/validators/config.ts | 2 +- server/middlewares/validators/feeds.ts | 2 +- server/middlewares/validators/follows.ts | 2 +- server/middlewares/validators/jobs.ts | 2 +- server/middlewares/validators/logs.ts | 2 +- server/middlewares/validators/oembed.ts | 2 +- server/middlewares/validators/pagination.ts | 2 +- server/middlewares/validators/plugins.ts | 2 +- server/middlewares/validators/redundancy.ts | 2 +- server/middlewares/validators/search.ts | 2 +- server/middlewares/validators/server.ts | 2 +- server/middlewares/validators/shared/utils.ts | 2 +- server/middlewares/validators/shared/video-channels.ts | 2 +- server/middlewares/validators/shared/video-comments.ts | 2 +- server/middlewares/validators/shared/video-imports.ts | 2 +- server/middlewares/validators/shared/video-ownerships.ts | 2 +- server/middlewares/validators/shared/video-playlists.ts | 2 +- server/middlewares/validators/themes.ts | 2 +- server/middlewares/validators/user-history.ts | 2 +- server/middlewares/validators/user-notifications.ts | 2 +- server/middlewares/validators/user-subscriptions.ts | 2 +- server/middlewares/validators/users.ts | 2 +- server/middlewares/validators/videos/video-blacklist.ts | 2 +- server/middlewares/validators/videos/video-captions.ts | 2 +- server/middlewares/validators/videos/video-channels.ts | 2 +- server/middlewares/validators/videos/video-comments.ts | 2 +- server/middlewares/validators/videos/video-imports.ts | 2 +- server/middlewares/validators/videos/video-live.ts | 2 +- server/middlewares/validators/videos/video-ownership-changes.ts | 2 +- server/middlewares/validators/videos/video-playlists.ts | 2 +- server/middlewares/validators/videos/video-rates.ts | 2 +- server/middlewares/validators/videos/video-shares.ts | 2 +- server/middlewares/validators/videos/video-watch.ts | 2 +- server/middlewares/validators/videos/videos.ts | 2 +- server/middlewares/validators/webfinger.ts | 2 +- 52 files changed, 54 insertions(+), 54 deletions(-) (limited to 'server/middlewares') 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 @@ -import * as express from 'express' +import express from 'express' import { Socket } from 'socket.io' import { getAccessToken } from '@server/lib/auth/oauth-model' import { 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 @@ // Thanks: https://github.com/kwhitley/apicache // We duplicated the library because it is unmaintened and prevent us to upgrade to recent NodeJS versions -import * as express from 'express' +import express from 'express' import { OutgoingHttpHeaders } from 'http' import { isTestInstance, parseDurationToMs } from '@server/helpers/core-utils' import { 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 @@ -import * as helmet from 'helmet' +import { contentSecurityPolicy } from 'helmet' import { CONFIG } from '../initializers/config' const baseDirectives = Object.assign({}, @@ -22,12 +22,12 @@ const baseDirectives = Object.assign({}, CONFIG.WEBSERVER.SCHEME === 'https' ? { upgradeInsecureRequests: [] } : {} ) -const baseCSP = helmet.contentSecurityPolicy({ +const baseCSP = contentSecurityPolicy({ directives: baseDirectives, reportOnly: CONFIG.CSP.REPORT_ONLY }) -const embedCSP = helmet.contentSecurityPolicy({ +const embedCSP = contentSecurityPolicy({ directives: Object.assign({}, baseDirectives, { frameAncestors: [ '*' ] }), reportOnly: CONFIG.CSP.REPORT_ONLY }) 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 @@ -import * as express from 'express' +import express from 'express' function openapiOperationDoc (options: { 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 @@ -import * as express from 'express' +import express from 'express' import { ProblemDocument, ProblemDocumentExtension } from 'http-problem-details' import { HttpStatusCode } from '@shared/models' 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 @@ -import * as express from 'express' +import express from 'express' import { PAGINATION } from '../initializers/constants' function 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 @@ -import * as express from 'express' +import express from 'express' import { HttpStatusCode } from '../../shared/models/http/http-error-codes' import { getHostWithPort } from '../helpers/express-utils' 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 @@ -import * as express from 'express' +import express from 'express' import { SortType } from '../models/utils' const 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 @@ -import * as express from 'express' +import express from 'express' import { UserRight } from '../../shared' import { HttpStatusCode } from '../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { 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 @@ -import * as express from 'express' +import express from 'express' import { param } from 'express-validator' import { isAccountNameValid } from '../../helpers/custom-validators/accounts' import { 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 @@ -import * as express from 'express' +import express from 'express' import { getServerActor } from '@server/models/application/application' import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { query } from 'express-validator' import { PAGINATION } from '@server/initializers/constants' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { isActorImageFile } from '@server/helpers/custom-validators/actor-images' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param } from 'express-validator' import { getServerActor } from '@server/models/application/application' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { isBulkRemoveCommentsOfScopeValid } from '@server/helpers/custom-validators/bulk' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { isIntOrNull } from '@server/helpers/custom-validators/misc' import { 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 @@ -import * as express from 'express' +import express from 'express' import { param, query } from 'express-validator' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { isEachUniqueHandleValid, isFollowStateValid, isRemoteHandleValid } from '@server/helpers/custom-validators/follows' import { 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 @@ -import * as express from 'express' +import express from 'express' import { param, query } from 'express-validator' import { isValidJobState, isValidJobType } from '../../helpers/custom-validators/jobs' import { 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 @@ -import * as express from 'express' +import express from 'express' import { query } from 'express-validator' import { isValidLogLevel } from '../../helpers/custom-validators/logs' import { 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 @@ -import * as express from 'express' +import express from 'express' import { query } from 'express-validator' import { join } from 'path' import { 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 @@ -import * as express from 'express' +import express from 'express' import { query } from 'express-validator' import { PAGINATION } from '@server/initializers/constants' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query, ValidationChain } from 'express-validator' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { isVideoRedundancyTarget } from '@server/helpers/custom-validators/video-redundancies' import { 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 @@ -import * as express from 'express' +import express from 'express' import { query } from 'express-validator' import { isSearchTargetValid } from '@server/helpers/custom-validators/search' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { param, query, validationResult } from 'express-validator' import { isIdOrUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc' import { 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 @@ -import * as express from 'express' +import express from 'express' import { VideoChannelModel } from '@server/models/video/video-channel' import { MChannelBannerAccountDefault } from '@server/types/models' import { 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 @@ -import * as express from 'express' +import express from 'express' import { VideoCommentModel } from '@server/models/video/video-comment' import { MVideoId } from '@server/types/models' import { 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 @@ -import * as express from 'express' +import express from 'express' import { VideoImportModel } from '@server/models/video/video-import' import { HttpStatusCode } from '@shared/models' 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 @@ -import * as express from 'express' +import express from 'express' import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' import { HttpStatusCode } from '@shared/models' 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 @@ -import * as express from 'express' +import express from 'express' import { VideoPlaylistModel } from '@server/models/video/video-playlist' import { MVideoPlaylist } from '@server/types/models' import { 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 @@ -import * as express from 'express' +import express from 'express' import { param } from 'express-validator' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, query } from 'express-validator' import { exists, isDateValid } from '../../helpers/custom-validators/misc' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, query } from 'express-validator' import { isNotEmptyIntArray, toBooleanOrNull } from '../../helpers/custom-validators/misc' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { omit } from 'lodash' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, query } from 'express-validator' import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param } from 'express-validator' import { UserRight } from '../../../../shared' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { VIDEO_CHANNELS } from '@server/initializers/constants' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { MUserAccountUrl } from '@server/types/models' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { isPreImportVideoAccepted } from '@server/lib/moderation' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { CONSTRAINTS_FIELDS } from '@server/initializers/constants' import { 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 @@ -import * as express from 'express' +import express from 'express' import { param } from 'express-validator' import { isIdValid } from '@server/helpers/custom-validators/misc' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query, ValidationChain } from 'express-validator' import { ExpressPromiseHandler } from '@server/types/express' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, param, query } from 'express-validator' import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { param } from 'express-validator' import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body } from 'express-validator' import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { 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 @@ -import * as express from 'express' +import express from 'express' import { body, header, param, query, ValidationChain } from 'express-validator' import { getResumableUploadPath } from '@server/helpers/upload' import { 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 @@ -import * as express from 'express' +import express from 'express' import { query } from 'express-validator' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' import { isWebfingerLocalResourceValid } from '../../helpers/custom-validators/webfinger' -- cgit v1.2.3