aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/client-html.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r--server/lib/client-html.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 72984e778..a69e09c32 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -1,12 +1,13 @@
1import * as express from 'express' 1import * as express from 'express'
2import * as Bluebird from 'bluebird' 2import * as Bluebird from 'bluebird'
3import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n' 3import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n'
4import { CONFIG, EMBED_SIZE, CUSTOM_HTML_TAG_COMMENTS, STATIC_PATHS } from '../initializers' 4import { CONFIG, CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE, STATIC_PATHS } from '../initializers'
5import { join } from 'path' 5import { join } from 'path'
6import { escapeHTML, readFileBufferPromise } from '../helpers/core-utils' 6import { escapeHTML } from '../helpers/core-utils'
7import { VideoModel } from '../models/video/video' 7import { VideoModel } from '../models/video/video'
8import * as validator from 'validator' 8import * as validator from 'validator'
9import { VideoPrivacy } from '../../shared/models/videos' 9import { VideoPrivacy } from '../../shared/models/videos'
10import { readFile } from 'fs-extra'
10 11
11export class ClientHtml { 12export class ClientHtml {
12 13
@@ -20,7 +21,7 @@ export class ClientHtml {
20 const path = ClientHtml.getIndexPath(req, res, paramLang) 21 const path = ClientHtml.getIndexPath(req, res, paramLang)
21 if (ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path] 22 if (ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path]
22 23
23 const buffer = await readFileBufferPromise(path) 24 const buffer = await readFile(path)
24 25
25 let html = buffer.toString() 26 let html = buffer.toString()
26 27