diff options
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index a645c496b..2064857eb 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -1,5 +1,15 @@ | |||
1 | import * as cors from 'cors' | 1 | import * as cors from 'cors' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { join } from 'path' | ||
4 | import { getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config' | ||
5 | import { serveIndexHTML } from '@server/lib/client-html' | ||
6 | import { getTorrentFilePath, getVideoFilePath } from '@server/lib/video-paths' | ||
7 | import { MVideoFile, MVideoFullLight } from '@server/types/models' | ||
8 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | ||
9 | import { VideoStreamingPlaylistType } from '@shared/models/videos/video-streaming-playlist.type' | ||
10 | import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo' | ||
11 | import { root } from '../helpers/core-utils' | ||
12 | import { CONFIG, isEmailEnabled } from '../initializers/config' | ||
3 | import { | 13 | import { |
4 | CONSTRAINTS_FIELDS, | 14 | CONSTRAINTS_FIELDS, |
5 | DEFAULT_THEME_NAME, | 15 | DEFAULT_THEME_NAME, |
@@ -11,24 +21,13 @@ import { | |||
11 | STATIC_PATHS, | 21 | STATIC_PATHS, |
12 | WEBSERVER | 22 | WEBSERVER |
13 | } from '../initializers/constants' | 23 | } from '../initializers/constants' |
14 | import { cacheRoute } from '../middlewares/cache' | 24 | import { getThemeOrDefault } from '../lib/plugins/theme-utils' |
25 | import { getEnabledResolutions } from '../lib/video-transcoding' | ||
15 | import { asyncMiddleware, videosDownloadValidator } from '../middlewares' | 26 | import { asyncMiddleware, videosDownloadValidator } from '../middlewares' |
16 | import { VideoModel } from '../models/video/video' | 27 | import { cacheRoute } from '../middlewares/cache' |
17 | import { UserModel } from '../models/account/user' | 28 | import { UserModel } from '../models/account/user' |
29 | import { VideoModel } from '../models/video/video' | ||
18 | import { VideoCommentModel } from '../models/video/video-comment' | 30 | import { VideoCommentModel } from '../models/video/video-comment' |
19 | import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo' | ||
20 | import { join } from 'path' | ||
21 | import { root } from '../helpers/core-utils' | ||
22 | import { getEnabledResolutions } from '../lib/video-transcoding' | ||
23 | import { CONFIG, isEmailEnabled } from '../initializers/config' | ||
24 | import { getPreview, getVideoCaption } from './lazy-static' | ||
25 | import { VideoStreamingPlaylistType } from '@shared/models/videos/video-streaming-playlist.type' | ||
26 | import { MVideoFile, MVideoFullLight } from '@server/types/models' | ||
27 | import { getTorrentFilePath, getVideoFilePath } from '@server/lib/video-paths' | ||
28 | import { getThemeOrDefault } from '../lib/plugins/theme-utils' | ||
29 | import { getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config' | ||
30 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | ||
31 | import { serveIndexHTML } from '@server/lib/client-html' | ||
32 | 31 | ||
33 | const staticRouter = express.Router() | 32 | const staticRouter = express.Router() |
34 | 33 | ||