mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-28 13:21:02 +00:00
22 lines
556 B
TypeScript
22 lines
556 B
TypeScript
import { registerEvent } from "../register-event";
|
|
import type { GameShop } from "@types";
|
|
import { Ludusavi } from "@main/services";
|
|
import { gameRepository } from "@main/repository";
|
|
|
|
const getGameBackupPreview = async (
|
|
_event: Electron.IpcMainInvokeEvent,
|
|
objectId: string,
|
|
shop: GameShop
|
|
) => {
|
|
const game = await gameRepository.findOne({
|
|
where: {
|
|
objectID: objectId,
|
|
shop,
|
|
},
|
|
});
|
|
|
|
return Ludusavi.getBackupPreview(shop, objectId, game?.winePrefixPath);
|
|
};
|
|
|
|
registerEvent("getGameBackupPreview", getGameBackupPreview);
|