aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r--server/controllers/client.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index 022a17ff4..35e5af9d1 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -21,8 +21,9 @@ const testEmbedPath = join(distPath, 'standalone', 'videos', 'test-embed.html')
21// Do not use a template engine for a so little thing 21// Do not use a template engine for a so little thing
22clientsRouter.use('/videos/watch/playlist/:id', asyncMiddleware(generateWatchPlaylistHtmlPage)) 22clientsRouter.use('/videos/watch/playlist/:id', asyncMiddleware(generateWatchPlaylistHtmlPage))
23clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage)) 23clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage))
24clientsRouter.use('/accounts/:nameWithHost', asyncMiddleware(generateAccountHtmlPage)) 24clientsRouter.use([ '/accounts/:nameWithHost', '/a/:nameWithHost' ], asyncMiddleware(generateAccountHtmlPage))
25clientsRouter.use('/video-channels/:nameWithHost', asyncMiddleware(generateVideoChannelHtmlPage)) 25clientsRouter.use([ '/video-channels/:nameWithHost', '/c/:nameWithHost' ], asyncMiddleware(generateVideoChannelHtmlPage))
26clientsRouter.use('/@:nameWithHost', asyncMiddleware(generateActorHtmlPage))
26 27
27const embedMiddlewares = [ 28const embedMiddlewares = [
28 CONFIG.CSP.ENABLED 29 CONFIG.CSP.ENABLED
@@ -155,6 +156,12 @@ async function generateVideoChannelHtmlPage (req: express.Request, res: express.
155 return sendHTML(html, res) 156 return sendHTML(html, res)
156} 157}
157 158
159async function generateActorHtmlPage (req: express.Request, res: express.Response) {
160 const html = await ClientHtml.getActorHTMLPage(req.params.nameWithHost, req, res)
161
162 return sendHTML(html, res)
163}
164
158async function generateManifest (req: express.Request, res: express.Response) { 165async function generateManifest (req: express.Request, res: express.Response) {
159 const manifestPhysicalPath = join(root(), 'client', 'dist', 'manifest.webmanifest') 166 const manifestPhysicalPath = join(root(), 'client', 'dist', 'manifest.webmanifest')
160 const manifestJson = await readFile(manifestPhysicalPath, 'utf8') 167 const manifestJson = await readFile(manifestPhysicalPath, 'utf8')