API: move /download API to where it should be

This commit is contained in:
Jesse Chan
2020-09-30 19:13:51 +08:00
parent 2e9fef29b0
commit 2443bc9303
5 changed files with 43 additions and 8 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ const client = {
if (!torrentDetails) return res.status(404).json({error: 'Torrent details not found'});
let files;
if (!fileString) {
if (!fileString || fileString === 'all') {
files = torrentDetails.fileTree.files.map((x, i) => `${i}`);
} else {
files = fileString.split(',');