aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-18 11:28:00 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-18 13:38:09 +0100
commit8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769 (patch)
tree863daf231cf4a66d9e5abf1cfe4fbe2b742cd856 /server/controllers
parentf66db4d5c851fe87bb71cccee96926000f59a15b (diff)
downloadPeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.tar.gz
PeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.tar.zst
PeerTube-8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769.zip
Cleanup
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/index.ts2
-rw-r--r--server/controllers/lazy-static.ts1
2 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index dcd6194ae..e89315930 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -222,7 +222,7 @@ async function addVideo (req: express.Request, res: express.Response) {
222 }) 222 })
223 223
224 // Create the torrent file 224 // Create the torrent file
225 await createTorrentAndSetInfoHash(video, video, videoFile) 225 await createTorrentAndSetInfoHash(video, videoFile)
226 226
227 const { videoCreated } = await sequelizeTypescript.transaction(async t => { 227 const { videoCreated } = await sequelizeTypescript.transaction(async t => {
228 const sequelizeOptions = { transaction: t } 228 const sequelizeOptions = { transaction: t }
diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts
index c2f5c7b56..4e553479b 100644
--- a/server/controllers/lazy-static.ts
+++ b/server/controllers/lazy-static.ts
@@ -94,5 +94,6 @@ async function getTorrent (req: express.Request, res: express.Response) {
94 const result = await VideosTorrentCache.Instance.getFilePath(req.params.filename) 94 const result = await VideosTorrentCache.Instance.getFilePath(req.params.filename)
95 if (!result) return res.sendStatus(HttpStatusCode.NOT_FOUND_404) 95 if (!result) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
96 96
97 // Torrents still use the old naming convention (video uuid + .torrent)
97 return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.SERVER }) 98 return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.SERVER })
98} 99}