mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 05:46:17 +00:00
14 lines
419 B
TypeScript
14 lines
419 B
TypeScript
import { registerEvent } from "../register-event";
|
|
import { gameRepository } from "../../repository";
|
|
import { DownloadManager } from "@main/services";
|
|
|
|
const pauseGameDownload = async (
|
|
_event: Electron.IpcMainInvokeEvent,
|
|
gameId: number
|
|
) => {
|
|
await DownloadManager.pauseDownload();
|
|
await gameRepository.update({ id: gameId }, { status: "paused" });
|
|
};
|
|
|
|
registerEvent("pauseGameDownload", pauseGameDownload);
|