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