mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 01:03:57 +00:00
refactor: Update import paths and improve async function in get-magnet-health
This commit is contained in:
@@ -10,10 +10,12 @@ export const webTorrentData = {
|
||||
return new Promise((resolve, reject) => {
|
||||
WebTorrentHealth(magnet, (err: Error, data: WebTorrentHealthData) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(data);
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
const { peers, seeds } = data;
|
||||
|
||||
return resolve({ peers, seeders: seeds });
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user