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,
|
||||
})
|
||||
.getAllData()
|
||||
.then((e) => e.torrents.map((torrent) => torrents.push(torrent)))
|
||||
.then((e) => torrents.push(...e.torrents))
|
||||
)
|
||||
);
|
||||
await Promise.all(
|
||||
@@ -38,7 +38,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
password: 'password' in service ? service.password : '',
|
||||
})
|
||||
.getAllData()
|
||||
.then((e) => e.torrents.map((torrent) => torrents.push(torrent)))
|
||||
.then((e) => torrents.push(...e.torrents))
|
||||
)
|
||||
);
|
||||
// Map transmissionServices
|
||||
@@ -50,7 +50,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
password: 'password' in service ? service.password : '',
|
||||
})
|
||||
.getAllData()
|
||||
.then((e) => e.torrents.map((torrent) => torrents.push(torrent)))
|
||||
.then((e) => torrents.push(...e.torrents))
|
||||
)
|
||||
);
|
||||
res.status(200).json(torrents);
|
||||
|
||||
Reference in New Issue
Block a user