aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/client-html.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
commit62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch)
treec45c35d35d7a3e32621fba06edc63646930c8efd /server/lib/client-html.ts
parent84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff)
downloadPeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip
Correctly migrate to fs-extra
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