From 9054a8b6e522dd8d46260dca85e9de94a2d806cf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Aug 2020 14:16:39 +0200 Subject: Handle playlist methods in embed api --- server/controllers/client.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/controllers/client.ts') diff --git a/server/controllers/client.ts b/server/controllers/client.ts index b97c935a5..39a198b59 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -36,10 +36,11 @@ const embedMiddlewares = [ clientsRouter.use('/videos/embed', ...embedMiddlewares) clientsRouter.use('/video-playlists/embed', ...embedMiddlewares) -clientsRouter.use( - '/videos/test-embed', - (req: express.Request, res: express.Response) => res.sendFile(testEmbedPath) -) + +const testEmbedController = (req: express.Request, res: express.Response) => res.sendFile(testEmbedPath) + +clientsRouter.use('/videos/test-embed', testEmbedController) +clientsRouter.use('/video-playlists/test-embed', testEmbedController) // Static HTML/CSS/JS client files const staticClientFiles = [ -- cgit v1.2.3