Merge branch 'feat/new-catalogue' into feat/achievements-points

This commit is contained in:
Zamitto
2024-12-23 16:19:20 -03:00
19 changed files with 568 additions and 387 deletions

View File

@@ -2,16 +2,15 @@ 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,
page: number
take: number,
skip: number
) => {
return HydraApi.post(
"/catalogue/search",
{ ...payload, take: page * PAGE_SIZE, skip: (page - 1) * PAGE_SIZE },
{ ...payload, take, skip },
{ needsAuth: false }
);
};