mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
🚑 Hotfix to spread torrent pushing
This commit is contained in:
@@ -28,7 +28,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
password: service.password,
|
password: service.password,
|
||||||
})
|
})
|
||||||
.getAllData()
|
.getAllData()
|
||||||
.then((e) => e.torrents.map((torrent) => torrents.push(torrent)))
|
.then((e) => torrents.push(...e.torrents))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
@@ -38,7 +38,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
password: 'password' in service ? service.password : '',
|
password: 'password' in service ? service.password : '',
|
||||||
})
|
})
|
||||||
.getAllData()
|
.getAllData()
|
||||||
.then((e) => e.torrents.map((torrent) => torrents.push(torrent)))
|
.then((e) => torrents.push(...e.torrents))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// Map transmissionServices
|
// Map transmissionServices
|
||||||
@@ -50,7 +50,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
password: 'password' in service ? service.password : '',
|
password: 'password' in service ? service.password : '',
|
||||||
})
|
})
|
||||||
.getAllData()
|
.getAllData()
|
||||||
.then((e) => e.torrents.map((torrent) => torrents.push(torrent)))
|
.then((e) => torrents.push(...e.torrents))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
res.status(200).json(torrents);
|
res.status(200).json(torrents);
|
||||||
|
|||||||
Reference in New Issue
Block a user