hydra/src/main/events/library/get-game-by-object-id.ts
2024-04-21 06:26:29 +01:00

20 lines
383 B
TypeScript

import { gameRepository } from "@main/repository";
import { registerEvent } from "../register-event";
const getGameByObjectID = async (
_event: Electron.IpcMainInvokeEvent,
objectID: string
) =>
gameRepository.findOne({
where: {
objectID,
},
relations: {
repack: true,
},
});
registerEvent(getGameByObjectID, {
name: "getGameByObjectID",
});