From 075f16caac5236cb04c98ae7b3a989766d764bb3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2017 17:04:57 +0200 Subject: Remove "function" in favor of () => {} --- server/controllers/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers/client.ts') diff --git a/server/controllers/client.ts b/server/controllers/client.ts index ac722a578..d913f81b8 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -24,7 +24,7 @@ const indexPath = join(distPath, 'index.html') // Do not use a template engine for a so little thing clientsRouter.use('/videos/watch/:id', generateWatchHtmlPage) -clientsRouter.use('/videos/embed', function (req: express.Request, res: express.Response, next: express.NextFunction) { +clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response, next: express.NextFunction) => { res.sendFile(embedPath) }) @@ -32,7 +32,7 @@ clientsRouter.use('/videos/embed', function (req: express.Request, res: express. clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) // 404 for static files not found -clientsRouter.use('/client/*', function (req: express.Request, res: express.Response, next: express.NextFunction) { +clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { res.sendStatus(404) }) -- cgit v1.2.3