From 453e83ea5d81d203ba34bc43cd5c2c750ba40568 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Aug 2019 11:53:26 +0200 Subject: Stronger model typings --- server/controllers/static.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/controllers/static.ts') diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 8979ef5f3..0f4772310 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -226,14 +226,14 @@ async function generateNodeinfo (req: express.Request, res: express.Response) { return res.send(json).end() } -async function downloadTorrent (req: express.Request, res: express.Response, next: express.NextFunction) { +async function downloadTorrent (req: express.Request, res: express.Response) { const { video, videoFile } = getVideoAndFile(req, res) if (!videoFile) return res.status(404).end() return res.download(video.getTorrentFilePath(videoFile), `${video.name}-${videoFile.resolution}p.torrent`) } -async function downloadVideoFile (req: express.Request, res: express.Response, next: express.NextFunction) { +async function downloadVideoFile (req: express.Request, res: express.Response) { const { video, videoFile } = getVideoAndFile(req, res) if (!videoFile) return res.status(404).end() @@ -242,7 +242,7 @@ async function downloadVideoFile (req: express.Request, res: express.Response, n function getVideoAndFile (req: express.Request, res: express.Response) { const resolution = parseInt(req.params.resolution, 10) - const video = res.locals.video + const video = res.locals.videoAll const videoFile = video.VideoFiles.find(f => f.resolution === resolution) -- cgit v1.2.3