refactor: Update import paths and improve async function in get-magnet-health

This commit is contained in:
ChristoferMendes
2024-05-12 21:16:15 -03:00
parent 23ab98294a
commit 0333282915
3 changed files with 8 additions and 6 deletions

View File

@@ -0,0 +1,10 @@
import { webTorrentData } from "@main/services/web-torrent-data"
import { registerEvent } from "../../register-event"
const getMagnetHealth = async (_event: Electron.IpcMainInvokeEvent, magnet: string) => {
return webTorrentData.getSeedersAndPeers(magnet)
}
registerEvent(getMagnetHealth, {
name: 'getMagnetHealth'
})