From: Chocobozzz Date: Tue, 29 May 2018 16:35:01 +0000 (+0200) Subject: Fix static function name X-Git-Tag: v1.0.0-beta.8~77 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9118bca30759a2cc2584cde0bbca13466af735fb;p=oweals%2Fpeertube.git Fix static function name --- diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 8bebe6fa7..139ba67cc 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -77,20 +77,20 @@ async function getPreview (req: express.Request, res: express.Response, next: ex } async function downloadTorrent (req: express.Request, res: express.Response, next: express.NextFunction) { - const { video, videoFile } = getVideoAndFileOr404(req, res) + 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) { - const { video, videoFile } = getVideoAndFileOr404(req, res) + const { video, videoFile } = getVideoAndFile(req, res) if (!videoFile) return res.status(404).end() return res.download(video.getVideoFilePath(videoFile), `${video.name}-${videoFile.resolution}p${videoFile.extname}`) } -function getVideoAndFileOr404 (req: express.Request, res: express.Response) { +function getVideoAndFile (req: express.Request, res: express.Response) { const resolution = parseInt(req.params.resolution, 10) const video: VideoModel = res.locals.video