X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fdownload.ts;h=d675a2d6cd4bfc56fc11664194be8c5beaaa155f;hb=0c302acb3c358b4d4d8dee45aed1de1108ea37ea;hp=65b9a1d1b740bb1199ee3d5e5ce909e59db3416b;hpb=77239b425a8e00822a53c9907415832a473c3eb6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/download.ts b/server/controllers/download.ts index 65b9a1d1b..d675a2d6c 100644 --- a/server/controllers/download.ts +++ b/server/controllers/download.ts @@ -50,7 +50,12 @@ async function downloadTorrent (req: express.Request, res: express.Response) { }) } - const allowParameters = { torrentPath: result.path, downloadName: result.downloadName } + const allowParameters = { + req, + res, + torrentPath: result.path, + downloadName: result.downloadName + } const allowedResult = await Hooks.wrapFun( isTorrentDownloadAllowed, @@ -74,7 +79,12 @@ async function downloadVideoFile (req: express.Request, res: express.Response) { }) } - const allowParameters = { video, videoFile } + const allowParameters = { + req, + res, + video, + videoFile + } const allowedResult = await Hooks.wrapFun( isVideoDownloadAllowed, @@ -110,7 +120,13 @@ async function downloadHLSVideoFile (req: express.Request, res: express.Response }) } - const allowParameters = { video, streamingPlaylist, videoFile } + const allowParameters = { + req, + res, + video, + streamingPlaylist, + videoFile + } const allowedResult = await Hooks.wrapFun( isVideoDownloadAllowed,