diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/client.ts | 11 |
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 |
22 | clientsRouter.use('/videos/watch/playlist/:id', asyncMiddleware(generateWatchPlaylistHtmlPage)) | 22 | clientsRouter.use('/videos/watch/playlist/:id', asyncMiddleware(generateWatchPlaylistHtmlPage)) |
23 | clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage)) | 23 | clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage)) |
24 | clientsRouter.use('/accounts/:nameWithHost', asyncMiddleware(generateAccountHtmlPage)) | 24 | clientsRouter.use([ '/accounts/:nameWithHost', '/a/:nameWithHost' ], asyncMiddleware(generateAccountHtmlPage)) |
25 | clientsRouter.use('/video-channels/:nameWithHost', asyncMiddleware(generateVideoChannelHtmlPage)) | 25 | clientsRouter.use([ '/video-channels/:nameWithHost', '/c/:nameWithHost' ], asyncMiddleware(generateVideoChannelHtmlPage)) |
26 | clientsRouter.use('/@:nameWithHost', asyncMiddleware(generateActorHtmlPage)) | ||
26 | 27 | ||
27 | const embedMiddlewares = [ | 28 | const 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 | ||
159 | async 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 | |||
158 | async function generateManifest (req: express.Request, res: express.Response) { | 165 | async 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') |