diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-27 14:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-27 15:12:22 +0200 |
commit | 41fb13c330de629df2d23379209e79c7af0f2e9a (patch) | |
tree | 73bc5a90566406b3910f142beae2a879c1e4265d /server/controllers/api | |
parent | 40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff) | |
download | PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip |
esModuleInterop to true
Diffstat (limited to 'server/controllers/api')
44 files changed, 53 insertions, 53 deletions
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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { logger } from '@server/helpers/logger' | 2 | import { logger } from '@server/helpers/logger' |
3 | import { createAccountAbuse, createVideoAbuse, createVideoCommentAbuse } from '@server/lib/moderation' | 3 | import { createAccountAbuse, createVideoAbuse, createVideoCommentAbuse } from '@server/lib/moderation' |
4 | import { Notifier } from '@server/lib/notifier' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { pickCommonVideoQuery } from '@server/helpers/query' | 2 | import { pickCommonVideoQuery } from '@server/helpers/query' |
3 | import { getServerActor } from '@server/models/application/application' | 3 | import { getServerActor } from '@server/models/application/application' |
4 | import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { removeComment } from '@server/lib/video-comment' | 2 | import { removeComment } from '@server/lib/video-comment' |
3 | import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk' | 3 | import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk' |
4 | import { VideoCommentModel } from '@server/models/video/video-comment' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { remove, writeJSON } from 'fs-extra' | 2 | import { remove, writeJSON } from 'fs-extra' |
3 | import { snakeCase } from 'lodash' | 3 | import { snakeCase } from 'lodash' |
4 | import validator from 'validator' | 4 | import 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { ServerConfigManager } from '@server/lib/server-config-manager' | 2 | import { ServerConfigManager } from '@server/lib/server-config-manager' |
3 | import { ActorCustomPageModel } from '@server/models/account/actor-custom-page' | 3 | import { ActorCustomPageModel } from '@server/models/account/actor-custom-page' |
4 | import { HttpStatusCode, UserRight } from '@shared/models' | 4 | import { 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 @@ | |||
1 | import * as cors from 'cors' | 1 | import cors from 'cors' |
2 | import * as express from 'express' | 2 | import express from 'express' |
3 | import * as RateLimit from 'express-rate-limit' | 3 | import RateLimit from 'express-rate-limit' |
4 | import { HttpStatusCode } from '../../../shared/models' | 4 | import { HttpStatusCode } from '../../../shared/models' |
5 | import { badRequest } from '../../helpers/express-utils' | 5 | import { badRequest } from '../../helpers/express-utils' |
6 | import { CONFIG } from '../../initializers/config' | 6 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { ResultList } from '../../../shared' | 2 | import { ResultList } from '../../../shared' |
3 | import { Job, JobState, JobType } from '../../../shared/models' | 3 | import { Job, JobState, JobType } from '../../../shared/models' |
4 | import { UserRight } from '../../../shared/models/users' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { OAuthClientLocal } from '../../../shared' | 2 | import { OAuthClientLocal } from '../../../shared' |
3 | import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' |
4 | import { logger } from '../../helpers/logger' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import * as memoizee from 'memoizee' | 2 | import memoizee from 'memoizee' |
3 | import { logger } from '@server/helpers/logger' | 3 | import { logger } from '@server/helpers/logger' |
4 | import { Hooks } from '@server/lib/plugins/hooks' | 4 | import { Hooks } from '@server/lib/plugins/hooks' |
5 | import { VideoModel } from '@server/models/video/video' | 5 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { logger } from '@server/helpers/logger' | 2 | import { logger } from '@server/helpers/logger' |
3 | import { getFormattedObjects } from '@server/helpers/utils' | 3 | import { getFormattedObjects } from '@server/helpers/utils' |
4 | import { listAvailablePluginsFromIndex } from '@server/lib/plugins/plugin-index' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { searchChannelsRouter } from './search-video-channels' | 2 | import { searchChannelsRouter } from './search-video-channels' |
3 | import { searchPlaylistsRouter } from './search-video-playlists' | 3 | import { searchPlaylistsRouter } from './search-video-playlists' |
4 | import { searchVideosRouter } from './search-videos' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { sanitizeUrl } from '@server/helpers/core-utils' | 2 | import { sanitizeUrl } from '@server/helpers/core-utils' |
3 | import { pickSearchChannelQuery } from '@server/helpers/query' | 3 | import { pickSearchChannelQuery } from '@server/helpers/query' |
4 | import { doJSONRequest } from '@server/helpers/requests' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { sanitizeUrl } from '@server/helpers/core-utils' | 2 | import { sanitizeUrl } from '@server/helpers/core-utils' |
3 | import { isUserAbleToSearchRemoteURI } from '@server/helpers/express-utils' | 3 | import { isUserAbleToSearchRemoteURI } from '@server/helpers/express-utils' |
4 | import { logger } from '@server/helpers/logger' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { sanitizeUrl } from '@server/helpers/core-utils' | 2 | import { sanitizeUrl } from '@server/helpers/core-utils' |
3 | import { pickSearchVideoQuery } from '@server/helpers/query' | 3 | import { pickSearchVideoQuery } from '@server/helpers/query' |
4 | import { doJSONRequest } from '@server/helpers/requests' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 2 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
3 | import { ContactForm } from '../../../../shared/models/server' | 3 | import { ContactForm } from '../../../../shared/models/server' |
4 | import { Emailer } from '../../../lib/emailer' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { InboxManager } from '@server/lib/activitypub/inbox-manager' | 2 | import { InboxManager } from '@server/lib/activitypub/inbox-manager' |
3 | import { RemoveDanglingResumableUploadsScheduler } from '@server/lib/schedulers/remove-dangling-resumable-uploads-scheduler' | 3 | import { RemoveDanglingResumableUploadsScheduler } from '@server/lib/schedulers/remove-dangling-resumable-uploads-scheduler' |
4 | import { Debug, SendDebugCommand } from '@shared/models' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { getServerActor } from '@server/models/application/application' | 2 | import { getServerActor } from '@server/models/application/application' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { UserRight } from '../../../../shared/models/users' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { contactRouter } from './contact' | 2 | import { contactRouter } from './contact' |
3 | import { debugRouter } from './debug' | 3 | import { debugRouter } from './debug' |
4 | import { serverFollowsRouter } from './follows' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { readdir, readFile } from 'fs-extra' | 2 | import { readdir, readFile } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { logger, mtimeSortFilesDesc } from '@server/helpers/logger' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { JobQueue } from '@server/lib/job-queue' | 2 | import { JobQueue } from '@server/lib/job-queue' |
3 | import { VideoRedundancyModel } from '@server/models/redundancy/video-redundancy' | 3 | import { VideoRedundancyModel } from '@server/models/redundancy/video-redundancy' |
4 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 4 | import { 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 @@ | |||
1 | import 'multer' | 1 | import 'multer' |
2 | import * as express from 'express' | 2 | import express from 'express' |
3 | import { logger } from '@server/helpers/logger' | 3 | import { logger } from '@server/helpers/logger' |
4 | import { getServerActor } from '@server/models/application/application' | 4 | import { getServerActor } from '@server/models/application/application' |
5 | import { UserNotificationModel } from '@server/models/user/user-notification' | 5 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { StatsManager } from '@server/lib/stat-manager' | 2 | import { StatsManager } from '@server/lib/stat-manager' |
3 | import { ROUTE_CACHE_LIFETIME } from '../../../initializers/constants' | 3 | import { ROUTE_CACHE_LIFETIME } from '../../../initializers/constants' |
4 | import { asyncMiddleware } from '../../../middlewares' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import * as RateLimit from 'express-rate-limit' | 2 | import RateLimit from 'express-rate-limit' |
3 | import { tokensRouter } from '@server/controllers/api/users/token' | 3 | import { tokensRouter } from '@server/controllers/api/users/token' |
4 | import { Hooks } from '@server/lib/plugins/hooks' | 4 | import { Hooks } from '@server/lib/plugins/hooks' |
5 | import { OAuthTokenModel } from '@server/models/oauth/oauth-token' | 5 | import { 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 @@ | |||
1 | import 'multer' | 1 | import 'multer' |
2 | import * as express from 'express' | 2 | import express from 'express' |
3 | import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger' | 3 | import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger' |
4 | import { Hooks } from '@server/lib/plugins/hooks' | 4 | import { Hooks } from '@server/lib/plugins/hooks' |
5 | import { AttributesOnly } from '@shared/core-utils' | 5 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { AbuseModel } from '@server/models/abuse/abuse' | 2 | import { AbuseModel } from '@server/models/abuse/abuse' |
3 | import { | 3 | import { |
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 @@ | |||
1 | import 'multer' | 1 | import 'multer' |
2 | import * as express from 'express' | 2 | import express from 'express' |
3 | import { logger } from '@server/helpers/logger' | 3 | import { logger } from '@server/helpers/logger' |
4 | import { UserNotificationModel } from '@server/models/user/user-notification' | 4 | import { UserNotificationModel } from '@server/models/user/user-notification' |
5 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 5 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 2 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
3 | import { getFormattedObjects } from '../../../helpers/utils' | 3 | import { getFormattedObjects } from '../../../helpers/utils' |
4 | import { sequelizeTypescript } from '../../../initializers/database' | 4 | import { 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 @@ | |||
1 | import 'multer' | 1 | import 'multer' |
2 | import * as express from 'express' | 2 | import express from 'express' |
3 | import { UserNotificationModel } from '@server/models/user/user-notification' | 3 | import { UserNotificationModel } from '@server/models/user/user-notification' |
4 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 4 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
5 | import { UserNotificationSetting } from '../../../../shared/models/users' | 5 | import { 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 @@ | |||
1 | import 'multer' | 1 | import 'multer' |
2 | import * as express from 'express' | 2 | import express from 'express' |
3 | import { pickCommonVideoQuery } from '@server/helpers/query' | 3 | import { pickCommonVideoQuery } from '@server/helpers/query' |
4 | import { sendUndoFollow } from '@server/lib/activitypub/send' | 4 | import { sendUndoFollow } from '@server/lib/activitypub/send' |
5 | import { VideoChannelModel } from '@server/models/video/video-channel' | 5 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { VideosExistInPlaylists } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model' | 2 | import { VideosExistInPlaylists } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model' |
3 | import { asyncMiddleware, authenticate } from '../../../middlewares' | 3 | import { asyncMiddleware, authenticate } from '../../../middlewares' |
4 | import { doVideosInPlaylistExistValidator } from '../../../middlewares/validators/videos/video-playlists' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import * as RateLimit from 'express-rate-limit' | 2 | import RateLimit from 'express-rate-limit' |
3 | import { logger } from '@server/helpers/logger' | 3 | import { logger } from '@server/helpers/logger' |
4 | import { buildUUID } from '@server/helpers/uuid' | 4 | import { buildUUID } from '@server/helpers/uuid' |
5 | import { CONFIG } from '@server/initializers/config' | 5 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { pickCommonVideoQuery } from '@server/helpers/query' | 2 | import { pickCommonVideoQuery } from '@server/helpers/query' |
3 | import { Hooks } from '@server/lib/plugins/hooks' | 3 | import { Hooks } from '@server/lib/plugins/hooks' |
4 | import { getServerActor } from '@server/models/application/application' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import { uuidToShort } from '@server/helpers/uuid' | 3 | import { uuidToShort } from '@server/helpers/uuid' |
4 | import { scheduleRefreshIfNeeded } from '@server/lib/activitypub/playlists' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { blacklistVideo, unblacklistVideo } from '@server/lib/video-blacklist' | 2 | import { blacklistVideo, unblacklistVideo } from '@server/lib/video-blacklist' |
3 | import { UserRight, VideoBlacklistCreate } from '../../../../shared' | 3 | import { UserRight, VideoBlacklistCreate } from '../../../../shared' |
4 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { MVideoCaption } from '@server/types/models' | 2 | import { MVideoCaption } from '@server/types/models' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models' | 2 | import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { VideoCommentThreads } from '../../../../shared/models/videos/comment/video-comment.model' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { move, readFile } from 'fs-extra' | 2 | import { move, readFile } from 'fs-extra' |
3 | import * as magnetUtil from 'magnet-uri' | 3 | import { decode } from 'magnet-uri' |
4 | import * as parseTorrent from 'parse-torrent' | 4 | import parseTorrent, { Instance } from 'parse-torrent' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { ServerConfigManager } from '@server/lib/server-config-manager' | 6 | import { ServerConfigManager } from '@server/lib/server-config-manager' |
7 | import { setVideoTags } from '@server/lib/video' | 7 | import { 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 | ||
350 | function processMagnetURI (body: VideoImportCreate) { | 350 | function 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import toInt from 'validator/lib/toInt' | 2 | import toInt from 'validator/lib/toInt' |
3 | import { pickCommonVideoQuery } from '@server/helpers/query' | 3 | import { pickCommonVideoQuery } from '@server/helpers/query' |
4 | import { doJSONRequest } from '@server/helpers/requests' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { createReqFiles } from '@server/helpers/express-utils' | 2 | import { createReqFiles } from '@server/helpers/express-utils' |
3 | import { buildUUID, uuidToShort } from '@server/helpers/uuid' | 3 | import { buildUUID, uuidToShort } from '@server/helpers/uuid' |
4 | import { CONFIG } from '@server/initializers/config' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { MVideoFullLight } from '@server/types/models' | 2 | import { MVideoFullLight } from '@server/types/models' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { UserVideoRateUpdate } from '../../../../shared' | 2 | import { UserVideoRateUpdate } from '../../../../shared' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { logger } from '../../../helpers/logger' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { Transaction } from 'sequelize/types' | 2 | import { Transaction } from 'sequelize/types' |
3 | import { changeVideoChannelShare } from '@server/lib/activitypub/share' | 3 | import { changeVideoChannelShare } from '@server/lib/activitypub/share' |
4 | import { buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { move } from 'fs-extra' | 2 | import { move } from 'fs-extra' |
3 | import { basename } from 'path' | 3 | import { basename } from 'path' |
4 | import { getLowercaseExtension } from '@server/helpers/core-utils' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { UserWatchingVideo } from '../../../../shared' | 2 | import { UserWatchingVideo } from '../../../../shared' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { | 4 | import { |