mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-27 04:41:03 +00:00
19 lines
447 B
TypeScript
19 lines
447 B
TypeScript
import type { CatalogueSearchPayload } from "@types";
|
|
import { registerEvent } from "../register-event";
|
|
import { HydraApi } from "@main/services";
|
|
|
|
const searchGames = async (
|
|
_event: Electron.IpcMainInvokeEvent,
|
|
payload: CatalogueSearchPayload,
|
|
take: number,
|
|
skip: number
|
|
) => {
|
|
return HydraApi.post(
|
|
"/catalogue/search",
|
|
{ ...payload, take, skip },
|
|
{ needsAuth: false }
|
|
);
|
|
};
|
|
|
|
registerEvent("searchGames", searchGames);
|