feat: removing publishers

This commit is contained in:
Chubby Granny Chaser
2024-12-23 00:42:08 +00:00
parent 4607665908
commit 602ee61cb6
8 changed files with 65 additions and 45 deletions

View File

@@ -2,13 +2,16 @@ import type { CatalogueSearchPayload } from "@types";
import { registerEvent } from "../register-event";
import { HydraApi } from "@main/services";
const PAGE_SIZE = 12;
const searchGames = async (
_event: Electron.IpcMainInvokeEvent,
payload: CatalogueSearchPayload
payload: CatalogueSearchPayload,
page: number
) => {
return HydraApi.post(
"/catalogue/search",
{ ...payload, take: 24, skip: 0 },
{ ...payload, take: page * PAGE_SIZE, skip: (page - 1) * PAGE_SIZE },
{ needsAuth: false }
);
};