aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-27 14:32:44 +0200
committerChocobozzz <me@florianbigard.com>2021-08-27 15:12:22 +0200
commit41fb13c330de629df2d23379209e79c7af0f2e9a (patch)
tree73bc5a90566406b3910f142beae2a879c1e4265d /server/controllers
parent40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff)
downloadPeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz
PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst
PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip
esModuleInterop to true
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/activitypub/client.ts4
-rw-r--r--server/controllers/activitypub/inbox.ts2
-rw-r--r--server/controllers/activitypub/index.ts2
-rw-r--r--server/controllers/activitypub/outbox.ts2
-rw-r--r--server/controllers/activitypub/utils.ts2
-rw-r--r--server/controllers/api/abuse.ts2
-rw-r--r--server/controllers/api/accounts.ts2
-rw-r--r--server/controllers/api/bulk.ts2
-rw-r--r--server/controllers/api/config.ts2
-rw-r--r--server/controllers/api/custom-page.ts2
-rw-r--r--server/controllers/api/index.ts6
-rw-r--r--server/controllers/api/jobs.ts2
-rw-r--r--server/controllers/api/oauth-clients.ts2
-rw-r--r--server/controllers/api/overviews.ts4
-rw-r--r--server/controllers/api/plugins.ts2
-rw-r--r--server/controllers/api/search/index.ts2
-rw-r--r--server/controllers/api/search/search-video-channels.ts2
-rw-r--r--server/controllers/api/search/search-video-playlists.ts2
-rw-r--r--server/controllers/api/search/search-videos.ts2
-rw-r--r--server/controllers/api/server/contact.ts2
-rw-r--r--server/controllers/api/server/debug.ts2
-rw-r--r--server/controllers/api/server/follows.ts2
-rw-r--r--server/controllers/api/server/index.ts2
-rw-r--r--server/controllers/api/server/logs.ts2
-rw-r--r--server/controllers/api/server/redundancy.ts2
-rw-r--r--server/controllers/api/server/server-blocklist.ts2
-rw-r--r--server/controllers/api/server/stats.ts2
-rw-r--r--server/controllers/api/users/index.ts4
-rw-r--r--server/controllers/api/users/me.ts2
-rw-r--r--server/controllers/api/users/my-abuses.ts2
-rw-r--r--server/controllers/api/users/my-blocklist.ts2
-rw-r--r--server/controllers/api/users/my-history.ts2
-rw-r--r--server/controllers/api/users/my-notifications.ts2
-rw-r--r--server/controllers/api/users/my-subscriptions.ts2
-rw-r--r--server/controllers/api/users/my-video-playlists.ts2
-rw-r--r--server/controllers/api/users/token.ts4
-rw-r--r--server/controllers/api/video-channel.ts2
-rw-r--r--server/controllers/api/video-playlist.ts2
-rw-r--r--server/controllers/api/videos/blacklist.ts2
-rw-r--r--server/controllers/api/videos/captions.ts2
-rw-r--r--server/controllers/api/videos/comment.ts2
-rw-r--r--server/controllers/api/videos/import.ts10
-rw-r--r--server/controllers/api/videos/index.ts2
-rw-r--r--server/controllers/api/videos/live.ts2
-rw-r--r--server/controllers/api/videos/ownership.ts2
-rw-r--r--server/controllers/api/videos/rate.ts2
-rw-r--r--server/controllers/api/videos/update.ts2
-rw-r--r--server/controllers/api/videos/upload.ts2
-rw-r--r--server/controllers/api/videos/watching.ts2
-rw-r--r--server/controllers/bots.ts2
-rw-r--r--server/controllers/client.ts2
-rw-r--r--server/controllers/download.ts4
-rw-r--r--server/controllers/feeds.ts4
-rw-r--r--server/controllers/lazy-static.ts4
-rw-r--r--server/controllers/live.ts4
-rw-r--r--server/controllers/plugins.ts2
-rw-r--r--server/controllers/services.ts2
-rw-r--r--server/controllers/static.ts4
-rw-r--r--server/controllers/tracker.ts12
-rw-r--r--server/controllers/webfinger.ts4
60 files changed, 80 insertions, 82 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index bef4bc068..c4e3cec6b 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -1,5 +1,5 @@
1import * as cors from 'cors' 1import cors from 'cors'
2import * as express from 'express' 2import express from 'express'
3import { getServerActor } from '@server/models/application/application' 3import { getServerActor } from '@server/models/application/application'
4import { MAccountId, MActorId, MChannelId, MVideoId } from '@server/types/models' 4import { MAccountId, MActorId, MChannelId, MVideoId } from '@server/types/models'
5import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' 5import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos'
diff --git a/server/controllers/activitypub/inbox.ts b/server/controllers/activitypub/inbox.ts
index 30662990a..ece4edff0 100644
--- a/server/controllers/activitypub/inbox.ts
+++ b/server/controllers/activitypub/inbox.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { InboxManager } from '@server/lib/activitypub/inbox-manager' 2import { InboxManager } from '@server/lib/activitypub/inbox-manager'
3import { Activity, ActivityPubCollection, ActivityPubOrderedCollection, RootActivity } from '../../../shared' 3import { Activity, ActivityPubCollection, ActivityPubOrderedCollection, RootActivity } from '../../../shared'
4import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
diff --git a/server/controllers/activitypub/index.ts b/server/controllers/activitypub/index.ts
index 7e81902af..8c681820a 100644
--- a/server/controllers/activitypub/index.ts
+++ b/server/controllers/activitypub/index.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { activityPubClientRouter } from './client' 2import { activityPubClientRouter } from './client'
3import { inboxRouter } from './inbox' 3import { inboxRouter } from './inbox'
4import { outboxRouter } from './outbox' 4import { outboxRouter } from './outbox'
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts
index 22328da7f..bdf9d138b 100644
--- a/server/controllers/activitypub/outbox.ts
+++ b/server/controllers/activitypub/outbox.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { Activity } from '../../../shared/models/activitypub/activity' 2import { Activity } from '../../../shared/models/activitypub/activity'
3import { VideoPrivacy } from '../../../shared/models/videos' 3import { VideoPrivacy } from '../../../shared/models/videos'
4import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' 4import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub'
diff --git a/server/controllers/activitypub/utils.ts b/server/controllers/activitypub/utils.ts
index 19bdd58eb..f851ef652 100644
--- a/server/controllers/activitypub/utils.ts
+++ b/server/controllers/activitypub/utils.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2 2
3function activityPubResponse (data: any, res: express.Response) { 3function activityPubResponse (data: any, res: express.Response) {
4 return res.type('application/activity+json; charset=utf-8') 4 return res.type('application/activity+json; charset=utf-8')
diff --git a/server/controllers/api/abuse.ts b/server/controllers/api/abuse.ts
index e851365e9..72c418e74 100644
--- a/server/controllers/api/abuse.ts
+++ b/server/controllers/api/abuse.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { logger } from '@server/helpers/logger' 2import { logger } from '@server/helpers/logger'
3import { createAccountAbuse, createVideoAbuse, createVideoCommentAbuse } from '@server/lib/moderation' 3import { createAccountAbuse, createVideoAbuse, createVideoCommentAbuse } from '@server/lib/moderation'
4import { Notifier } from '@server/lib/notifier' 4import { Notifier } from '@server/lib/notifier'
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts
index 55e2aaf62..75679b0f4 100644
--- a/server/controllers/api/accounts.ts
+++ b/server/controllers/api/accounts.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { pickCommonVideoQuery } from '@server/helpers/query' 2import { pickCommonVideoQuery } from '@server/helpers/query'
3import { getServerActor } from '@server/models/application/application' 3import { getServerActor } from '@server/models/application/application'
4import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' 4import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils'
diff --git a/server/controllers/api/bulk.ts b/server/controllers/api/bulk.ts
index 62121ece5..d27c3c73e 100644
--- a/server/controllers/api/bulk.ts
+++ b/server/controllers/api/bulk.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { removeComment } from '@server/lib/video-comment' 2import { removeComment } from '@server/lib/video-comment'
3import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk' 3import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk'
4import { VideoCommentModel } from '@server/models/video/video-comment' 4import { VideoCommentModel } from '@server/models/video/video-comment'
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index ee733a38c..d542f62aa 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { remove, writeJSON } from 'fs-extra' 2import { remove, writeJSON } from 'fs-extra'
3import { snakeCase } from 'lodash' 3import { snakeCase } from 'lodash'
4import validator from 'validator' 4import validator from 'validator'
diff --git a/server/controllers/api/custom-page.ts b/server/controllers/api/custom-page.ts
index 68d8c2ea4..d1c672f3f 100644
--- a/server/controllers/api/custom-page.ts
+++ b/server/controllers/api/custom-page.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { ServerConfigManager } from '@server/lib/server-config-manager' 2import { ServerConfigManager } from '@server/lib/server-config-manager'
3import { ActorCustomPageModel } from '@server/models/account/actor-custom-page' 3import { ActorCustomPageModel } from '@server/models/account/actor-custom-page'
4import { HttpStatusCode, UserRight } from '@shared/models' 4import { HttpStatusCode, UserRight } from '@shared/models'
diff --git a/server/controllers/api/index.ts b/server/controllers/api/index.ts
index 93b14dadb..9949b378a 100644
--- a/server/controllers/api/index.ts
+++ b/server/controllers/api/index.ts
@@ -1,6 +1,6 @@
1import * as cors from 'cors' 1import cors from 'cors'
2import * as express from 'express' 2import express from 'express'
3import * as RateLimit from 'express-rate-limit' 3import RateLimit from 'express-rate-limit'
4import { HttpStatusCode } from '../../../shared/models' 4import { HttpStatusCode } from '../../../shared/models'
5import { badRequest } from '../../helpers/express-utils' 5import { badRequest } from '../../helpers/express-utils'
6import { CONFIG } from '../../initializers/config' 6import { CONFIG } from '../../initializers/config'
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts
index 9e333322b..7001674bb 100644
--- a/server/controllers/api/jobs.ts
+++ b/server/controllers/api/jobs.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { ResultList } from '../../../shared' 2import { ResultList } from '../../../shared'
3import { Job, JobState, JobType } from '../../../shared/models' 3import { Job, JobState, JobType } from '../../../shared/models'
4import { UserRight } from '../../../shared/models/users' 4import { UserRight } from '../../../shared/models/users'
diff --git a/server/controllers/api/oauth-clients.ts b/server/controllers/api/oauth-clients.ts
index f95f06864..4990fb0df 100644
--- a/server/controllers/api/oauth-clients.ts
+++ b/server/controllers/api/oauth-clients.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { OAuthClientLocal } from '../../../shared' 2import { OAuthClientLocal } 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/controllers/api/overviews.ts b/server/controllers/api/overviews.ts
index 2dfac15ef..5b16232e2 100644
--- a/server/controllers/api/overviews.ts
+++ b/server/controllers/api/overviews.ts
@@ -1,5 +1,5 @@
1import * as express from 'express' 1import express from 'express'
2import * as memoizee from 'memoizee' 2import memoizee from 'memoizee'
3import { logger } from '@server/helpers/logger' 3import { logger } from '@server/helpers/logger'
4import { Hooks } from '@server/lib/plugins/hooks' 4import { Hooks } from '@server/lib/plugins/hooks'
5import { VideoModel } from '@server/models/video/video' 5import { VideoModel } from '@server/models/video/video'
diff --git a/server/controllers/api/plugins.ts b/server/controllers/api/plugins.ts
index 3a9ef34e8..2de7fe41f 100644
--- a/server/controllers/api/plugins.ts
+++ b/server/controllers/api/plugins.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { logger } from '@server/helpers/logger' 2import { logger } from '@server/helpers/logger'
3import { getFormattedObjects } from '@server/helpers/utils' 3import { getFormattedObjects } from '@server/helpers/utils'
4import { listAvailablePluginsFromIndex } from '@server/lib/plugins/plugin-index' 4import { listAvailablePluginsFromIndex } from '@server/lib/plugins/plugin-index'
diff --git a/server/controllers/api/search/index.ts b/server/controllers/api/search/index.ts
index 67adbb307..39efc0b10 100644
--- a/server/controllers/api/search/index.ts
+++ b/server/controllers/api/search/index.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { searchChannelsRouter } from './search-video-channels' 2import { searchChannelsRouter } from './search-video-channels'
3import { searchPlaylistsRouter } from './search-video-playlists' 3import { searchPlaylistsRouter } from './search-video-playlists'
4import { searchVideosRouter } from './search-videos' 4import { searchVideosRouter } from './search-videos'
diff --git a/server/controllers/api/search/search-video-channels.ts b/server/controllers/api/search/search-video-channels.ts
index eef222506..25173ac20 100644
--- a/server/controllers/api/search/search-video-channels.ts
+++ b/server/controllers/api/search/search-video-channels.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { sanitizeUrl } from '@server/helpers/core-utils' 2import { sanitizeUrl } from '@server/helpers/core-utils'
3import { pickSearchChannelQuery } from '@server/helpers/query' 3import { pickSearchChannelQuery } from '@server/helpers/query'
4import { doJSONRequest } from '@server/helpers/requests' 4import { doJSONRequest } from '@server/helpers/requests'
diff --git a/server/controllers/api/search/search-video-playlists.ts b/server/controllers/api/search/search-video-playlists.ts
index 0a56f19b7..b28f11c79 100644
--- a/server/controllers/api/search/search-video-playlists.ts
+++ b/server/controllers/api/search/search-video-playlists.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { sanitizeUrl } from '@server/helpers/core-utils' 2import { sanitizeUrl } from '@server/helpers/core-utils'
3import { isUserAbleToSearchRemoteURI } from '@server/helpers/express-utils' 3import { isUserAbleToSearchRemoteURI } from '@server/helpers/express-utils'
4import { logger } from '@server/helpers/logger' 4import { logger } from '@server/helpers/logger'
diff --git a/server/controllers/api/search/search-videos.ts b/server/controllers/api/search/search-videos.ts
index 4a6ce0de4..eb7ce0841 100644
--- a/server/controllers/api/search/search-videos.ts
+++ b/server/controllers/api/search/search-videos.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { sanitizeUrl } from '@server/helpers/core-utils' 2import { sanitizeUrl } from '@server/helpers/core-utils'
3import { pickSearchVideoQuery } from '@server/helpers/query' 3import { pickSearchVideoQuery } from '@server/helpers/query'
4import { doJSONRequest } from '@server/helpers/requests' 4import { doJSONRequest } from '@server/helpers/requests'
diff --git a/server/controllers/api/server/contact.ts b/server/controllers/api/server/contact.ts
index b315e99cf..09ff50f69 100644
--- a/server/controllers/api/server/contact.ts
+++ b/server/controllers/api/server/contact.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 { ContactForm } from '../../../../shared/models/server' 3import { ContactForm } from '../../../../shared/models/server'
4import { Emailer } from '../../../lib/emailer' 4import { Emailer } from '../../../lib/emailer'
diff --git a/server/controllers/api/server/debug.ts b/server/controllers/api/server/debug.ts
index 0601b89ce..093e6a03c 100644
--- a/server/controllers/api/server/debug.ts
+++ b/server/controllers/api/server/debug.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { InboxManager } from '@server/lib/activitypub/inbox-manager' 2import { InboxManager } from '@server/lib/activitypub/inbox-manager'
3import { RemoveDanglingResumableUploadsScheduler } from '@server/lib/schedulers/remove-dangling-resumable-uploads-scheduler' 3import { RemoveDanglingResumableUploadsScheduler } from '@server/lib/schedulers/remove-dangling-resumable-uploads-scheduler'
4import { Debug, SendDebugCommand } from '@shared/models' 4import { Debug, SendDebugCommand } from '@shared/models'
diff --git a/server/controllers/api/server/follows.ts b/server/controllers/api/server/follows.ts
index cbe6b7e4f..2e0fd25eb 100644
--- a/server/controllers/api/server/follows.ts
+++ b/server/controllers/api/server/follows.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 { UserRight } from '../../../../shared/models/users' 4import { UserRight } from '../../../../shared/models/users'
diff --git a/server/controllers/api/server/index.ts b/server/controllers/api/server/index.ts
index 32fefefc0..b20718d09 100644
--- a/server/controllers/api/server/index.ts
+++ b/server/controllers/api/server/index.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { contactRouter } from './contact' 2import { contactRouter } from './contact'
3import { debugRouter } from './debug' 3import { debugRouter } from './debug'
4import { serverFollowsRouter } from './follows' 4import { serverFollowsRouter } from './follows'
diff --git a/server/controllers/api/server/logs.ts b/server/controllers/api/server/logs.ts
index 39eceb654..dfd5491aa 100644
--- a/server/controllers/api/server/logs.ts
+++ b/server/controllers/api/server/logs.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { readdir, readFile } from 'fs-extra' 2import { readdir, readFile } from 'fs-extra'
3import { join } from 'path' 3import { join } from 'path'
4import { logger, mtimeSortFilesDesc } from '@server/helpers/logger' 4import { logger, mtimeSortFilesDesc } from '@server/helpers/logger'
diff --git a/server/controllers/api/server/redundancy.ts b/server/controllers/api/server/redundancy.ts
index e36c8d2db..9f43d3e4e 100644
--- a/server/controllers/api/server/redundancy.ts
+++ b/server/controllers/api/server/redundancy.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { JobQueue } from '@server/lib/job-queue' 2import { JobQueue } from '@server/lib/job-queue'
3import { VideoRedundancyModel } from '@server/models/redundancy/video-redundancy' 3import { VideoRedundancyModel } from '@server/models/redundancy/video-redundancy'
4import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
diff --git a/server/controllers/api/server/server-blocklist.ts b/server/controllers/api/server/server-blocklist.ts
index b3ee50d85..740f95da3 100644
--- a/server/controllers/api/server/server-blocklist.ts
+++ b/server/controllers/api/server/server-blocklist.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as express from 'express' 2import express from 'express'
3import { logger } from '@server/helpers/logger' 3import { logger } from '@server/helpers/logger'
4import { getServerActor } from '@server/models/application/application' 4import { getServerActor } from '@server/models/application/application'
5import { UserNotificationModel } from '@server/models/user/user-notification' 5import { UserNotificationModel } from '@server/models/user/user-notification'
diff --git a/server/controllers/api/server/stats.ts b/server/controllers/api/server/stats.ts
index 397702548..d661144ca 100644
--- a/server/controllers/api/server/stats.ts
+++ b/server/controllers/api/server/stats.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { StatsManager } from '@server/lib/stat-manager' 2import { StatsManager } from '@server/lib/stat-manager'
3import { ROUTE_CACHE_LIFETIME } from '../../../initializers/constants' 3import { ROUTE_CACHE_LIFETIME } from '../../../initializers/constants'
4import { asyncMiddleware } from '../../../middlewares' 4import { asyncMiddleware } from '../../../middlewares'
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts
index be800e8b5..bc47e5fec 100644
--- a/server/controllers/api/users/index.ts
+++ b/server/controllers/api/users/index.ts
@@ -1,5 +1,5 @@
1import * as express from 'express' 1import express from 'express'
2import * as RateLimit from 'express-rate-limit' 2import RateLimit from 'express-rate-limit'
3import { tokensRouter } from '@server/controllers/api/users/token' 3import { tokensRouter } from '@server/controllers/api/users/token'
4import { Hooks } from '@server/lib/plugins/hooks' 4import { Hooks } from '@server/lib/plugins/hooks'
5import { OAuthTokenModel } from '@server/models/oauth/oauth-token' 5import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index a98d79218..83b774d3c 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as express from 'express' 2import express from 'express'
3import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger' 3import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger'
4import { Hooks } from '@server/lib/plugins/hooks' 4import { Hooks } from '@server/lib/plugins/hooks'
5import { AttributesOnly } from '@shared/core-utils' 5import { AttributesOnly } from '@shared/core-utils'
diff --git a/server/controllers/api/users/my-abuses.ts b/server/controllers/api/users/my-abuses.ts
index fcd0ce3fc..103c3d332 100644
--- a/server/controllers/api/users/my-abuses.ts
+++ b/server/controllers/api/users/my-abuses.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { AbuseModel } from '@server/models/abuse/abuse' 2import { AbuseModel } from '@server/models/abuse/abuse'
3import { 3import {
4 abuseListForUserValidator, 4 abuseListForUserValidator,
diff --git a/server/controllers/api/users/my-blocklist.ts b/server/controllers/api/users/my-blocklist.ts
index 24fff83e3..0b56645cf 100644
--- a/server/controllers/api/users/my-blocklist.ts
+++ b/server/controllers/api/users/my-blocklist.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as express from 'express' 2import express from 'express'
3import { logger } from '@server/helpers/logger' 3import { logger } from '@server/helpers/logger'
4import { UserNotificationModel } from '@server/models/user/user-notification' 4import { UserNotificationModel } from '@server/models/user/user-notification'
5import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 5import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
diff --git a/server/controllers/api/users/my-history.ts b/server/controllers/api/users/my-history.ts
index a6e723103..2fcb25acf 100644
--- a/server/controllers/api/users/my-history.ts
+++ b/server/controllers/api/users/my-history.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 { getFormattedObjects } from '../../../helpers/utils' 3import { getFormattedObjects } from '../../../helpers/utils'
4import { sequelizeTypescript } from '../../../initializers/database' 4import { sequelizeTypescript } from '../../../initializers/database'
diff --git a/server/controllers/api/users/my-notifications.ts b/server/controllers/api/users/my-notifications.ts
index 3beee07c0..d107a306e 100644
--- a/server/controllers/api/users/my-notifications.ts
+++ b/server/controllers/api/users/my-notifications.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as express from 'express' 2import express from 'express'
3import { UserNotificationModel } from '@server/models/user/user-notification' 3import { UserNotificationModel } from '@server/models/user/user-notification'
4import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
5import { UserNotificationSetting } from '../../../../shared/models/users' 5import { UserNotificationSetting } from '../../../../shared/models/users'
diff --git a/server/controllers/api/users/my-subscriptions.ts b/server/controllers/api/users/my-subscriptions.ts
index 26a715704..e3c0cf089 100644
--- a/server/controllers/api/users/my-subscriptions.ts
+++ b/server/controllers/api/users/my-subscriptions.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as express from 'express' 2import express from 'express'
3import { pickCommonVideoQuery } from '@server/helpers/query' 3import { pickCommonVideoQuery } from '@server/helpers/query'
4import { sendUndoFollow } from '@server/lib/activitypub/send' 4import { sendUndoFollow } from '@server/lib/activitypub/send'
5import { VideoChannelModel } from '@server/models/video/video-channel' 5import { VideoChannelModel } from '@server/models/video/video-channel'
diff --git a/server/controllers/api/users/my-video-playlists.ts b/server/controllers/api/users/my-video-playlists.ts
index 76e741ba5..f55ea2ec4 100644
--- a/server/controllers/api/users/my-video-playlists.ts
+++ b/server/controllers/api/users/my-video-playlists.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { VideosExistInPlaylists } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model' 2import { VideosExistInPlaylists } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model'
3import { asyncMiddleware, authenticate } from '../../../middlewares' 3import { asyncMiddleware, authenticate } from '../../../middlewares'
4import { doVideosInPlaylistExistValidator } from '../../../middlewares/validators/videos/video-playlists' 4import { doVideosInPlaylistExistValidator } from '../../../middlewares/validators/videos/video-playlists'
diff --git a/server/controllers/api/users/token.ts b/server/controllers/api/users/token.ts
index b405ddbf4..d5dbe921c 100644
--- a/server/controllers/api/users/token.ts
+++ b/server/controllers/api/users/token.ts
@@ -1,5 +1,5 @@
1import * as express from 'express' 1import express from 'express'
2import * as RateLimit from 'express-rate-limit' 2import RateLimit from 'express-rate-limit'
3import { logger } from '@server/helpers/logger' 3import { logger } from '@server/helpers/logger'
4import { buildUUID } from '@server/helpers/uuid' 4import { buildUUID } from '@server/helpers/uuid'
5import { CONFIG } from '@server/initializers/config' 5import { CONFIG } from '@server/initializers/config'
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts
index a0c6601d9..b79dc5933 100644
--- a/server/controllers/api/video-channel.ts
+++ b/server/controllers/api/video-channel.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { pickCommonVideoQuery } from '@server/helpers/query' 2import { pickCommonVideoQuery } from '@server/helpers/query'
3import { Hooks } from '@server/lib/plugins/hooks' 3import { Hooks } from '@server/lib/plugins/hooks'
4import { getServerActor } from '@server/models/application/application' 4import { getServerActor } from '@server/models/application/application'
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts
index 4971d0a77..2f81cf43c 100644
--- a/server/controllers/api/video-playlist.ts
+++ b/server/controllers/api/video-playlist.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { join } from 'path' 2import { join } from 'path'
3import { uuidToShort } from '@server/helpers/uuid' 3import { uuidToShort } from '@server/helpers/uuid'
4import { scheduleRefreshIfNeeded } from '@server/lib/activitypub/playlists' 4import { scheduleRefreshIfNeeded } from '@server/lib/activitypub/playlists'
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts
index 6bc768471..de65c74f1 100644
--- a/server/controllers/api/videos/blacklist.ts
+++ b/server/controllers/api/videos/blacklist.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { blacklistVideo, unblacklistVideo } from '@server/lib/video-blacklist' 2import { blacklistVideo, unblacklistVideo } from '@server/lib/video-blacklist'
3import { UserRight, VideoBlacklistCreate } from '../../../../shared' 3import { UserRight, VideoBlacklistCreate } from '../../../../shared'
4import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
diff --git a/server/controllers/api/videos/captions.ts b/server/controllers/api/videos/captions.ts
index 4008de60f..2d2213327 100644
--- a/server/controllers/api/videos/captions.ts
+++ b/server/controllers/api/videos/captions.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { MVideoCaption } from '@server/types/models' 2import { MVideoCaption } from '@server/types/models'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' 4import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils'
diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts
index cb696f652..23bba9089 100644
--- a/server/controllers/api/videos/comment.ts
+++ b/server/controllers/api/videos/comment.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models' 2import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { VideoCommentThreads } from '../../../../shared/models/videos/comment/video-comment.model' 4import { VideoCommentThreads } from '../../../../shared/models/videos/comment/video-comment.model'
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index de9a5308a..39fc57788 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -1,7 +1,7 @@
1import * as express from 'express' 1import express from 'express'
2import { move, readFile } from 'fs-extra' 2import { move, readFile } from 'fs-extra'
3import * as magnetUtil from 'magnet-uri' 3import { decode } from 'magnet-uri'
4import * as parseTorrent from 'parse-torrent' 4import parseTorrent, { Instance } from 'parse-torrent'
5import { join } from 'path' 5import { join } from 'path'
6import { ServerConfigManager } from '@server/lib/server-config-manager' 6import { ServerConfigManager } from '@server/lib/server-config-manager'
7import { setVideoTags } from '@server/lib/video' 7import { setVideoTags } from '@server/lib/video'
@@ -329,7 +329,7 @@ async function processTorrentOrAbortRequest (req: express.Request, res: express.
329 torrentfile.path = newTorrentPath 329 torrentfile.path = newTorrentPath
330 330
331 const buf = await readFile(torrentfile.path) 331 const buf = await readFile(torrentfile.path)
332 const parsedTorrent = parseTorrent(buf) as parseTorrent.Instance 332 const parsedTorrent = parseTorrent(buf) as Instance
333 333
334 if (parsedTorrent.files.length !== 1) { 334 if (parsedTorrent.files.length !== 1) {
335 cleanUpReqFiles(req) 335 cleanUpReqFiles(req)
@@ -349,7 +349,7 @@ async function processTorrentOrAbortRequest (req: express.Request, res: express.
349 349
350function processMagnetURI (body: VideoImportCreate) { 350function processMagnetURI (body: VideoImportCreate) {
351 const magnetUri = body.magnetUri 351 const magnetUri = body.magnetUri
352 const parsed = magnetUtil.decode(magnetUri) 352 const parsed = decode(magnetUri)
353 353
354 return { 354 return {
355 name: extractNameFromArray(parsed.name), 355 name: extractNameFromArray(parsed.name),
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 10833d48b..c0c77f3f7 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import toInt from 'validator/lib/toInt' 2import toInt from 'validator/lib/toInt'
3import { pickCommonVideoQuery } from '@server/helpers/query' 3import { pickCommonVideoQuery } from '@server/helpers/query'
4import { doJSONRequest } from '@server/helpers/requests' 4import { doJSONRequest } from '@server/helpers/requests'
diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts
index 151ff354b..efafe64e9 100644
--- a/server/controllers/api/videos/live.ts
+++ b/server/controllers/api/videos/live.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { createReqFiles } from '@server/helpers/express-utils' 2import { createReqFiles } from '@server/helpers/express-utils'
3import { buildUUID, uuidToShort } from '@server/helpers/uuid' 3import { buildUUID, uuidToShort } from '@server/helpers/uuid'
4import { CONFIG } from '@server/initializers/config' 4import { CONFIG } from '@server/initializers/config'
diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts
index f48acbc68..043861ac3 100644
--- a/server/controllers/api/videos/ownership.ts
+++ b/server/controllers/api/videos/ownership.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { MVideoFullLight } from '@server/types/models' 2import { MVideoFullLight } from '@server/types/models'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' 4import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos'
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts
index 96f6cd886..c9cc16644 100644
--- a/server/controllers/api/videos/rate.ts
+++ b/server/controllers/api/videos/rate.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { UserVideoRateUpdate } from '../../../../shared' 2import { UserVideoRateUpdate } 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/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts
index 49639060b..a98a3e67c 100644
--- a/server/controllers/api/videos/update.ts
+++ b/server/controllers/api/videos/update.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { Transaction } from 'sequelize/types' 2import { Transaction } from 'sequelize/types'
3import { changeVideoChannelShare } from '@server/lib/activitypub/share' 3import { changeVideoChannelShare } from '@server/lib/activitypub/share'
4import { buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' 4import { buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video'
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts
index 5c740c041..7ffda749d 100644
--- a/server/controllers/api/videos/upload.ts
+++ b/server/controllers/api/videos/upload.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { move } from 'fs-extra' 2import { move } from 'fs-extra'
3import { basename } from 'path' 3import { basename } from 'path'
4import { getLowercaseExtension } from '@server/helpers/core-utils' 4import { getLowercaseExtension } from '@server/helpers/core-utils'
diff --git a/server/controllers/api/videos/watching.ts b/server/controllers/api/videos/watching.ts
index 05c75e543..e8c28b613 100644
--- a/server/controllers/api/videos/watching.ts
+++ b/server/controllers/api/videos/watching.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { UserWatchingVideo } from '../../../../shared' 2import { UserWatchingVideo } from '../../../../shared'
3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 3import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
4import { 4import {
diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts
index de0411608..63db345bf 100644
--- a/server/controllers/bots.ts
+++ b/server/controllers/bots.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { truncate } from 'lodash' 2import { truncate } from 'lodash'
3import { SitemapStream, streamToPromise } from 'sitemap' 3import { SitemapStream, streamToPromise } from 'sitemap'
4import { buildNSFWFilter } from '../helpers/express-utils' 4import { buildNSFWFilter } from '../helpers/express-utils'
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index ba3c54440..d81e35ec3 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { constants, promises as fs } from 'fs' 2import { constants, promises as fs } from 'fs'
3import { readFile } from 'fs-extra' 3import { readFile } from 'fs-extra'
4import { join } from 'path' 4import { join } from 'path'
diff --git a/server/controllers/download.ts b/server/controllers/download.ts
index ffe40d57e..8da710669 100644
--- a/server/controllers/download.ts
+++ b/server/controllers/download.ts
@@ -1,5 +1,5 @@
1import * as cors from 'cors' 1import cors from 'cors'
2import * as express from 'express' 2import express from 'express'
3import { logger } from '@server/helpers/logger' 3import { logger } from '@server/helpers/logger'
4import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache' 4import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache'
5import { Hooks } from '@server/lib/plugins/hooks' 5import { Hooks } from '@server/lib/plugins/hooks'
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts
index 9fa70a7c8..5ac2e43a1 100644
--- a/server/controllers/feeds.ts
+++ b/server/controllers/feeds.ts
@@ -1,5 +1,5 @@
1import * as express from 'express' 1import express from 'express'
2import * as Feed from 'pfeed' 2import Feed from 'pfeed'
3import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils' 3import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils'
4import { VideoFilter } from '../../shared/models/videos/video-query.type' 4import { VideoFilter } from '../../shared/models/videos/video-query.type'
5import { buildNSFWFilter } from '../helpers/express-utils' 5import { buildNSFWFilter } from '../helpers/express-utils'
diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts
index 632e4dcd8..a4076ee56 100644
--- a/server/controllers/lazy-static.ts
+++ b/server/controllers/lazy-static.ts
@@ -1,5 +1,5 @@
1import * as cors from 'cors' 1import cors from 'cors'
2import * as express from 'express' 2import express from 'express'
3import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache' 3import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache'
4import { HttpStatusCode } from '../../shared/models/http/http-error-codes' 4import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
5import { logger } from '../helpers/logger' 5import { logger } from '../helpers/logger'
diff --git a/server/controllers/live.ts b/server/controllers/live.ts
index 95d5c0135..81008f120 100644
--- a/server/controllers/live.ts
+++ b/server/controllers/live.ts
@@ -1,5 +1,5 @@
1import * as cors from 'cors' 1import cors from 'cors'
2import * as express from 'express' 2import express from 'express'
3import { mapToJSON } from '@server/helpers/core-utils' 3import { mapToJSON } from '@server/helpers/core-utils'
4import { LiveSegmentShaStore } from '@server/lib/live' 4import { LiveSegmentShaStore } from '@server/lib/live'
5import { HttpStatusCode } from '@shared/models' 5import { HttpStatusCode } from '@shared/models'
diff --git a/server/controllers/plugins.ts b/server/controllers/plugins.ts
index 11ab3f10a..28fffc9e1 100644
--- a/server/controllers/plugins.ts
+++ b/server/controllers/plugins.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { join } from 'path' 2import { join } from 'path'
3import { logger } from '@server/helpers/logger' 3import { logger } from '@server/helpers/logger'
4import { optionalAuthenticate } from '@server/middlewares/auth' 4import { optionalAuthenticate } from '@server/middlewares/auth'
diff --git a/server/controllers/services.ts b/server/controllers/services.ts
index 8c0af9ff7..8a8a95486 100644
--- a/server/controllers/services.ts
+++ b/server/controllers/services.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { EMBED_SIZE, PREVIEWS_SIZE, WEBSERVER, THUMBNAILS_SIZE } from '../initializers/constants' 2import { EMBED_SIZE, PREVIEWS_SIZE, WEBSERVER, THUMBNAILS_SIZE } from '../initializers/constants'
3import { asyncMiddleware, oembedValidator } from '../middlewares' 3import { asyncMiddleware, oembedValidator } from '../middlewares'
4import { accountNameWithHostGetValidator } from '../middlewares/validators' 4import { accountNameWithHostGetValidator } from '../middlewares/validators'
diff --git a/server/controllers/static.ts b/server/controllers/static.ts
index 912d7e36c..1c04e4b11 100644
--- a/server/controllers/static.ts
+++ b/server/controllers/static.ts
@@ -1,5 +1,5 @@
1import * as cors from 'cors' 1import cors from 'cors'
2import * as express from 'express' 2import express from 'express'
3import { join } from 'path' 3import { join } from 'path'
4import { serveIndexHTML } from '@server/lib/client-html' 4import { serveIndexHTML } from '@server/lib/client-html'
5import { ServerConfigManager } from '@server/lib/server-config-manager' 5import { ServerConfigManager } from '@server/lib/server-config-manager'
diff --git a/server/controllers/tracker.ts b/server/controllers/tracker.ts
index 37f8f12c9..da9c68c6c 100644
--- a/server/controllers/tracker.ts
+++ b/server/controllers/tracker.ts
@@ -1,7 +1,7 @@
1import * as bitTorrentTracker from 'bittorrent-tracker' 1import { Server as TrackerServer } from 'bittorrent-tracker'
2import * as express from 'express' 2import express from 'express'
3import * as http from 'http' 3import { createServer } from 'http'
4import * as proxyAddr from 'proxy-addr' 4import proxyAddr from 'proxy-addr'
5import { Server as WebSocketServer } from 'ws' 5import { Server as WebSocketServer } from 'ws'
6import { Redis } from '@server/lib/redis' 6import { Redis } from '@server/lib/redis'
7import { logger } from '../helpers/logger' 7import { logger } from '../helpers/logger'
@@ -10,8 +10,6 @@ import { TRACKER_RATE_LIMITS } from '../initializers/constants'
10import { VideoFileModel } from '../models/video/video-file' 10import { VideoFileModel } from '../models/video/video-file'
11import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' 11import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist'
12 12
13const TrackerServer = bitTorrentTracker.Server
14
15const trackerRouter = express.Router() 13const trackerRouter = express.Router()
16 14
17let peersIps = {} 15let peersIps = {}
@@ -86,7 +84,7 @@ trackerRouter.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { a
86trackerRouter.get('/tracker/scrape', (req, res) => onHttpRequest(req, res, { action: 'scrape' })) 84trackerRouter.get('/tracker/scrape', (req, res) => onHttpRequest(req, res, { action: 'scrape' }))
87 85
88function createWebsocketTrackerServer (app: express.Application) { 86function createWebsocketTrackerServer (app: express.Application) {
89 const server = http.createServer(app) 87 const server = createServer(app)
90 const wss = new WebSocketServer({ noServer: true }) 88 const wss = new WebSocketServer({ noServer: true })
91 89
92 wss.on('connection', function (ws, req) { 90 wss.on('connection', function (ws, req) {
diff --git a/server/controllers/webfinger.ts b/server/controllers/webfinger.ts
index 885e4498f..29ce01166 100644
--- a/server/controllers/webfinger.ts
+++ b/server/controllers/webfinger.ts
@@ -1,5 +1,5 @@
1import * as cors from 'cors' 1import cors from 'cors'
2import * as express from 'express' 2import express from 'express'
3import { WEBSERVER } from '@server/initializers/constants' 3import { WEBSERVER } from '@server/initializers/constants'
4import { asyncMiddleware } from '../middlewares' 4import { asyncMiddleware } from '../middlewares'
5import { webfingerValidator } from '../middlewares/validators' 5import { webfingerValidator } from '../middlewares/validators'